作者hukhuk (ken)
看板Linux
標題[問題] 關於/etc/hosts.allow 及 /etc/hosts.deny這二個檔?
時間Mon Nov 15 19:17:03 2010
各位好:
如果我在這二個檔案內都有寫入資料的話,那deny那份也會讀取到嗎?
參考鳥哥的範例如下:
[root@linux ~]# vi /etc/hosts.allow
sshd: 192.168.0.1, 192.168.0.2, 192.168.0.3, 192.168.0.4, 192.168.0.5: allow
[root@linux ~]# vi /etc/hosts.deny
sshd : ALL : spawn (/bin/echo Security notice from host `/bin/hostname`; \
/bin/echo; /usr/sbin/safe_finger @%h ) | \
/bin/mail -s "%d -%h security" root@localhost & \
: twist ( /bin/echo -e "\n\nWARNING connectin not allowed.". )
這樣子192.168.2.1-5到底能不能連,前面說可以,後面又說全擋...
先謝謝各位了
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 210.69.230.190
→ hukhuk:將192.168.2.1-5改為192.168.0.1-5 歹勢... 11/15 20:18
→ hukhuk:測試出來了,一樣會出來,但非1-5會被擋,自問自答...XD 11/16 00:45
→ a7236172:自問自答也是好事一件唷 :) 11/16 19:24
推 soem:只是自問自答沒辦法轉信出去..可能回個文會比較好~ 11/16 19:43