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

Rosalind avatar
By Rosalind
at 2010-11-15T19:17

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到底能不能連,前面說可以,後面又說全擋...
先謝謝各位了

--
Tags: Linux

All Comments

Doris avatar
By Doris
at 2010-11-18T15:18
將192.168.2.1-5改為192.168.0.1-5 歹勢...
Cara avatar
By Cara
at 2010-11-19T09:01
測試出來了,一樣會出來,但非1-5會被擋,自問自答...XD
Annie avatar
By Annie
at 2010-11-22T12:23
自問自答也是好事一件唷 :)
Catherine avatar
By Catherine
at 2010-11-22T18:31
只是自問自答沒辦法轉信出去..可能回個文會比較好~

顯卡用什麼驅動程式哪裡看?

Quintina avatar
By Quintina
at 2010-11-15T15:30
※ 引述《pgychen (pp)》之銘言: : 標題: [問題] 顯卡用什麼驅動程式哪裡看? : 時間: Mon Nov 15 02:14:19 2010 : : 請問顯卡用什麼驅動程式要去哪裡看? : : - ...

在Ubuntu 10.04下執行WOW不能輸入中文

Ida avatar
By Ida
at 2010-11-15T14:06
※ 引述《CGP (木瓜牛奶)》之銘言: : 但,重點是,不能輸入中文啊! : 一開始是使用ibus,打出來的字都會是??????? : 後來改使用scim,打出來的字還是??????? : 我google了很久,都是關於怎麼用WINE來執行WOW,中文輸入法好像大家都沒問題... : 有哪位先進可以指點一下 ...

shell command 的問題

Ethan avatar
By Ethan
at 2010-11-15T13:20
如果有一個command line echo and#34;Yesand#34;|sh myCommand y 如果在shell script內可以用 read 去讀取前面的stdinput and#34;Yesand#34; 但是如果要讀取一些特殊自元的話 例如 echo and#34;?and ...

想砍init?

Damian avatar
By Damian
at 2010-11-15T02:54
直接借標題用,因為我有不小心幹掉init過 (‘-’)r 狀況: 我用andlt;Altandgt;andlt;SysRqandgt;k (SAK) 想把tty1上的東西清乾淨 就kernel panic -- not syncing .....了 1,為什麼init會attached再tty ...

想砍init?

Rachel avatar
By Rachel
at 2010-11-15T02:32
各位好: 在下無聊輸入以下內容 [rootatlocalhost ~]# kill -9 1 結果啥也沒發生,不會當機也...這麼神奇,有人知道為啥嗎?是哪個機制 保護了init這個主程式...atata - ...