關於/etc/hosts.allow 及 /etc/hosts.deny這二個檔? - Linux

Table of Contents

各位好:
如果我在這二個檔案內都有寫入資料的話,那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到底能不能連,前面說可以,後面又說全擋...
先謝謝各位了

--

All Comments

Doris avatarDoris2010-11-18
將192.168.2.1-5改為192.168.0.1-5 歹勢...
Cara avatarCara2010-11-19
測試出來了,一樣會出來,但非1-5會被擋,自問自答...XD
Annie avatarAnnie2010-11-22
自問自答也是好事一件唷 :)
Catherine avatarCatherine2010-11-22
只是自問自答沒辦法轉信出去..可能回個文會比較好~