歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Unix知識 >> 關於Unix >> 配置DNS服務器(帶負載均衡及安全設置,Solaris9)

配置DNS服務器(帶負載均衡及安全設置,Solaris9)

日期:2017/3/6 15:25:24   编辑:關於Unix
配置DNS 服務器 (帶負載均衡及 安全 設置,Solaris9) 配置DNS服務器(帶負載均衡及安全設置,Solaris9) 從一台剛裝的Solaris9的系統開始,配置一台DNS服務器。 需要的軟件包 bind9.3.1 openssl openssh gcc zlib包 libiconv包 gzip包 zebrea top dnstop *

配置DNS服務器(帶負載均衡及安全設置,Solaris9)

配置DNS服務器(帶負載均衡及安全設置,Solaris9)

從一台剛裝的Solaris9的系統開始,配置一台DNS服務器。

需要的軟件包

bind9.3.1
openssl
openssh
gcc
zlib包
libiconv包
gzip包
zebrea
top
dnstop


*********vi中在要空一格時,盡量要使用TAB健*****************************************

安裝完系統後

*******************************************************************************

添加組

添加用戶

修改用戶密碼

*******************************************************************************

添加IP

添加路由ip

*******************************************************************************

修改/etc/defaultrouter文件
加入默認路由ip

*******************************************************************************

修改/etc/resolv.conf文件
domain 111.com
nameserver DNS ip

*******************************************************************************

修改/etc/nsswitch.conf文件
加入hosts: files dns

*******************************************************************************

修改/etc/hosts文件
221.212.255.140 cncv440 loghost
221.212.255.140為本服務器ip

*******************************************************************************

裝補丁(下載地點:sunslove.sun.com)
unzip patchname.zip
進入生成的新的目錄,使用./install_cluster安裝

*******************************************************************************

關閉無用服務
/etc/rc2.d和/etc/rc3.d下,利用腳本,批量修改

*******************************************************************************

裝軟件 (Solaris相關軟件與相關包得下載到 www.sunfreeware.com)

設置PATH
#LD_LIBRARY_PATH=/usr/lib:/usr/openwin/lib:/usr/local/lib:/usr/ucblib
#export LD_LIBRARY_PATH
#PATH=$PATH:/usr/local/bin:/usr/ccs/bin
#export PATH

*******************************************************************************

gcc (安裝gcc不一定要用最新版本)
.gz文件,用gzip -d gcc.gz打開
pkgadd -d ./gcc安裝

*******************************************************************************

bind

gzip -d bind.tar.gz

tar xvf bind.tar

./configure --prefix=/usr/local/bind9.3.1 --enable-threads --sysconfdir=/etc --localstatedir=/var/named

make

make install

注:S7中裝bind9.3.1是可能會用到libiconv包(config中提示缺少 libiconv.so.2 文件)

bind配置(自動啟動bind)

/etc/init.d/.netsvc中修改

/usr/local/bind9.3.1/sbin/named

/usr/local/bind9.3.1/sbin/named -4


*******************************************************************************

9中不用裝openssl

openssl
gzip -d openssl
pkgadd -d ./openssl

*******************************************************************************

9中不用openssh

openssh
gzip -d openssh
pkgadd -d ./openssh
注:openssh可能缺少zlib包


*******************************************************************************

9中不用裝tcp-warappers

tcp-warappers


設置:
修改/etc/hosts.allow文件
如下:
ALL : ALL : banners /etc/banner

修改 /etc/inetd.conf文件
如下:
telnet stream tcp nowait root /usr/local/bin/tcpd /usr/sbin/in.telnetd

測試:
# /usr/local/bin/tcpdmatch in.telnetd 202.97.224.68
client: address 202.97.224.68
server: process in.telnetd
matched: /etc/hosts.allow line 1
option: banners /etc/banner

內容:
*************************************************
* Hello 202.97.224.68, Welcome!
*************************************************
access: granted

*******************************************************************************


banner

solaris9 中 banners的使用 不用裝tcp_wrapper

在/etc/default/inetd中修改

ENABLE_CONNECTION_LOGGING=YES

ENABLE_TCPWRAPPERS=YES

新建/etc/hosts.allow文件

in.telnetd:ALL:banners /etc/banner

新建/etc/banner/in.telnetd文件

加入

*********************************
* Hello %h, Welcome you here!
*********************************

chmod 755 in.telnetd

重新啟動inetd

如果仍然有錯,重新在hosts.allow文件中輸入內容,或加個回車


*******************************************************************************


zebra

gzip -d
tar xvf
./configure
make
make install

*******************************************************************************


修改主機名

修改IP地址後需確認一下文件

/etc/hosts

/etc/hostname.bge0

/etc/defaultrouter

/etc/netmasks

/etc/nodename

*******************************************************************************

Copyright © Linux教程網 All Rights Reserved