Top > Linux > Vine3.xインストールメモ > セキュリティ
昨日:0 / 今日:1 / 合計:1787アクセス

tcp wrapper の設定 Edit

ローカルネットワークからの接続と某ホストからの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: localhost
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 192.168.0.0/255.255.255.0

sudoの設定 Edit

いちいちrootにsuせずともroot権限でコマンドを使いたいので、普段使ってるアカウントでsudoコマンドが使えるように設定。/etc/sudoersに以下を追加。

# User privilege specification
#yoshi  ALL=(ALL) NOPASSWD: ALL
yoshi   ALL=(ALL) ALL

上記の2行目にすると、sudo利用時にノーパスワードでするっといっちゃうのでコメントアウトし、パスワードを要求するように3行目を活かしとく。

SSHの設定 Edit

/etc/ssh_configは変更しなかった。Vine 2.6の環境から~/.sshをそのままコピーしたのみ。

GnuPGの設定 Edit

RPMパッケージをインストール。

> sudo apt-get install gnupg

後は、Vine 2.6の環境から~/.gnupgをコピーしたのみ。これで問題なし。

telnetの設定 Edit

sshの入ってないところからログインしたい場合もあるので、telnetでも入れるようにする。

# sudo apt-get install telnet-server
# sudo vi /etc/inetd.conf  ←telnetの行のコメントを外す
# sudo killall -HUP inetd

/etc/aliasesの設定 Edit

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

リロード   新規 下位ページ作成 編集 凍結 差分 添付 コピー 名前変更   ホーム 一覧 検索 最終更新 バックアップ リンク元   ヘルプ   最終更新のRSS
Last-modified: Wed, 02 Dec 2015 18:53:02 JST (3071d)