展開 # gtar zxvf tcp_wrappers_7.6.tar.gz Makefileの修正 # vi Makefile ---- Makefile の修正箇所 ----------------------------------------- # SysV.4 Solaris 2.x OSF AIX #REAL_DAEMON_DIR=/usr/sbin <--- REAL_DAEMON_DIR=/usr/sbin <---コメント外す --- #STYLE = -DPROCESS_OPTIONS # Enable language extensions. STYLE = -DPROCESS_OPTIONS # Enable language extensions. <---コメント外す --- #FACILITY= LOG_MAIL # LOG_MAIL is what most sendmail daemons use FACILITY= LOG_LOCAL0 # for TCP_wrapper log <--- mail(sendmail)と別なログファイル(syslog)へ保存させるため。 ------------------------------------------------------------- コンパイル # make CC=gcc sunos5 インストール 必要なファイルを適切なディレクトリへコピーでインストールする。 # cp -p tcpd tcpdchk tcpdmatch try-from safe_finger /usr/local/sbin マニュアルのコピー ※ディレクトリが無い場合は作成する。 # cp -p *.3 /usr/local/man/man3/ # cp -p *.5 /usr/local/man/man5/ # cp -p *.8 /usr/local/man/man8/ インストールファイルのアクセス権を変更 # cd /usr/local/sbin # chmod 700 tcpd # chmod 711 tcpdchk tcpdmatch try-from safe_finger アクセスリストファイルの作成と設定 ※/etcに作成する。 hosts.allow の作成 # vi hosts.allow 内容 ----------------- ALL:ALL hosts.deny の作成 # vi hosts.deny 内容 ----------------- ALL:ALL ファイルのアクセス権設定 # chmod 600 hosts.allow # chmod 600 hosts.deny /etc/inetd.conf の設定 ----------------------------------------------------------------------------- #telnet stream tcp6 nowait root /usr/sbin/in.telnetd in.telnetd telnet stream tcp nowait root /usr/local/sbin/tcpd in.telnetd <-- 設置したパス #ftp stream tcp6 nowait root /usr/sbin/in.ftpd in.ftpd ftp stream tcp nowait root /usr/local/sbin/tcpd in.ftpd <-- 設置したパス /etc/syslog.conf の設定 ----------------------------------------------------------------------------- local0.info /var/log/wrappers.log ログファイルの作成 # touch /var/log/wrappers.log シスログプロセスの再起動 # kill -HUP `cat /etc/syslog.pid`