RIGHT:昨日:&counter(yesterday); / 今日:&counter(today); / 合計:&counter(total);アクセス #access #contents ---- *tcp wrapper の設定 [#na1deaee] ローカルネットワークからの接続と某ホストからのftp 接続を許すように設定。/etc/hosts.allowは以下。 # # hosts.allow This file describes the names of the hosts which are # allowed to use the local INET services, as decided # by the '/usr/sbin/tcpd' server. # // ALL: 10.36.10.7 localhost ALL: localhost swat: localhost // swat: localhost // ALL EXCEPT sunrpc,portmap,snmpd: ALL in.ftpd: hoge.example.com 192.168.0.0/255.255.255.0 127.0.0.1 /etc/hosts.denyは以下。 # # hosts.deny This file describes the names of the hosts which are # *not* allowed to use the local INET services, as decided # by the '/usr/sbin/tcpd' server. # # The portmap line is redundant, but it is left to remind you that # the new secure portmap uses hosts.deny and hosts.allow. In particular # you should know that NFS uses portmap! // ALL: ALL: spawn=(/usr/sbin/safe_finger -l @%h | /bin/mail -s deny-%d-%h yoshi) EXCEPT 10.34.210.2 ALL: ALL: spawn=(/usr/sbin/safe_finger -l @%h | /bin/mail -s deny-%d-%h yoshi) EXCEPT 192.168.0.0/255.255.255.0 swat: ALL // swat: ALL *sudoの設定 [#jd9f717f] いちいちrootにsuせずともroot権限でコマンドを使いたいので、普段使ってるアカウントでsudoコマンドが使えるように設定。/etc/sudoersに以下を追加。 # User privilege specification #yoshi ALL=(ALL) NOPASSWD: ALL yoshi ALL=(ALL) ALL 上記の2行目にすると、sudo利用時にノーパスワードでするっといっちゃうのでコメントアウトし、パスワードを要求するように3行目を活かしとく。 *SSHの設定 [#p73adc70] /etc/ssh_configは変更しなかった。Vine 2.6の環境から~/.sshをそのままコピーしたのみ。 *GnuPGの設定 [#xe69bd7a] RPMパッケージをインストール。 > sudo apt-get install gnupg 後は、[[Vine 2.6の環境:http://www.kyo-ko.org/knowhow/vine/memo6.html#gnupg]]から~/.gnupgをコピーしたのみ。これで問題なし。 *telnetの設定 [#vfb22196] sshの入ってないところからログインしたい場合もあるので、telnetでも入れるようにする。 # sudo apt-get install telnet-server # sudo vi /etc/inetd.conf ←telnetの行のコメントを外す # sudo killall -HUP inetd */etc/aliasesの設定 [#n2f3b60b] root宛のメールも普段の一般アカウントに届くように設定。 # cd /etc # sudo cp -p aliases aliases.bak # sudo vi aliases # sudo newaliases /etc/aliasesは最後の行を以下のように変更。 # Person who should get root's mail root: yoshi |