請問一下TCP_Wrappers這個東東,allow和deny哪估比較大呢?

顯示結果從第 1 筆 到 3 筆,共計 3 筆
  1. #1
    美麗與智慧並重英 bigmichael 的大頭照
    註冊日期
    2001-07-20
    所在地區
    ADSL 2M/256
    討論區文章
    374

    請問一下TCP_Wrappers這個東東,allow和deny哪估比較大呢?

    我看了鳥哥的文章
    [root @test /root]# vi /etc/hosts.allow
    # 先寫關於 telnet, ftp 及 sshd 開放的資料
    in.telnetd: 192.168.1.2, 192.168.1.10, 192.168.1.20 : allow
    in.ftpd: 192.168.1.2, 192.168.1.10, 102.168.1.20 : allow
    sshd: 192.168.1.0/255.255.255.0, xxx.yyy.zzz.qqq : allow
    [root @test /root]# vi /etc/hosts.deny
    # 將上面的三個服務都關掉啦!
    in.telnetd: ALL : deny
    in.ftpd: ALL : deny
    sshd: ALL : deny



    我的設定如下


    [root @test /root]# vi /etc/hosts.allow
    sshd: 192.168.1.100/255.255.255.0 : allow

    [root @test /root]# vi /etc/hosts.deny
    sshd: ALL : deny


    這樣設是不是
    『拒絕所有,開放特定(192.168.1.100)』

    呢?
    但是我的192.168.1.100的電腦進不去也?
    但是我把host.deny改成如下就可以進去了

    [root @test /root]# vi /etc/hosts.deny
    #sshd: ALL : deny


    是不是我的hosts.allow那裡有設錯,還是他的
    原理是權限
    hosts.allow < hosts.deny呢?



  2. #2
    進階會員 repsol 的大頭照
    註冊日期
    2001-06-17
    所在地區
    ADSL 2M/256
    討論區文章
    818
    用tcpdmatch 檢查一下rule

    man tcpdmatch

    DESCRIPTION
    tcpdmatch predicts how the tcp wrapper would handle a spe?
    cific request for service. Examples are given below.

    The program examines the tcpd access control tables
    (default /etc/hosts.allow and /etc/hosts.deny) and prints
    its conclusion. For maximal accuracy, it extracts addi
    tional information from your inetd or tlid network config
    uration file.

    When tcpdmatch finds a match in the access control tables,
    it identifies the matched rule. In addition, it displays
    the optional shell commands or options in a pretty-printed
    format; this makes it easier for you to spot any discrep
    ancies between what you want and what the program under
    stands.

    使用範例
    EXAMPLES
    To predict how tcpd would handle a telnet request from the
    local system:

    tcpdmatch in.telnetd localhost

    The same request, pretending that hostname lookup failed:

    tcpdmatch in.telnetd 127.0.0.1

    To predict what tcpd would do when the client name does
    not match the client address:

    tcpdmatch in.telnetd paranoid


    example:我自己機器上的

    home.repsol.com:repsol/#tcpdmatch sshd 168.95.192.1
    warning: sshd: no such process name in /etc/inetd.conf
    client: address 168.95.192.1
    server: process sshd
    matched: /etc/hosts.deny line 4
    access: denied

    home.repsol.com:repsol/#tcpdmatch sshd 192.168.222.222
    warning: sshd: no such process name in /etc/inetd.conf
    client: address 192.168.222.222
    server: process sshd
    matched: /etc/hosts.allow line 10
    access: granted


    hosts.allow 和 hosts.deny 這兩個檢查的順序

    The access control software consults two files. The search
    stops at the first match:

    First match 之後停止 check

    掌握這個原則即可...
    「遥か昔、正義に生きる悪魔の伝説があった。
    剣を取って戦い、悪魔の侵略を退けた魔剣士。
    その伝説も、やがて人々の記憶から消えて行った。

    だが2000年の時を経て、魔界はより強大になって甦る。
    圧倒的なパワーで押し寄せる魔界の軍勢。
    本格的な人間界侵攻が始まった…。

    再び訪れた人類の危機に一人の男が立ち上がる。
    伝説の魔剣士の血を引く悪魔狩人(デビルハンター)、その名はダンテ!」

  3. #3
    美麗與智慧並重英 bigmichael 的大頭照
    註冊日期
    2001-07-20
    所在地區
    ADSL 2M/256
    討論區文章
    374
    感謝高手的指導!
    我試試看

類似的主題

  1. 【軟體求助】請問一下WIN98和WINXP網路印表機的問題?
    作者:spplkk2003 所在討論版:-- HELP ME 電 腦 軟 硬 體 急 救 版
    回覆: 4
    最後發表: 2007-06-06, 11:10 AM
  2. 【硬體求助】請問一下DDR266和DDR400能不能共存
    作者:i29686112 所在討論版:-- HELP ME 電 腦 軟 硬 體 急 救 版
    回覆: 6
    最後發表: 2006-05-25, 01:12 AM
  3. 請問一下AP3和AP4的差別??
    作者:louk 所在討論版:-- 無 線 網 路 版
    回覆: 1
    最後發表: 2003-07-03, 07:54 PM
  4. 請問一下pc133和pc100的記憶體可以插在一起嗎??
    作者:FATE 所在討論版:-- 電 腦 硬 體 討 論 版
    回覆: 2
    最後發表: 2001-09-08, 01:05 PM
  5. 請問一下Mr.Right和Miss Right是什麼東東啊
    作者:cfrank 所在討論版:-- 閒 話 家 常 灌 水 版
    回覆: 4
    最後發表: 2001-07-15, 02:50 AM

 

此網頁沒有從搜尋引擎而來的訪客

發表文章規則

  • 不可以發表新主題
  • 不可以回覆文章
  • 不可以上傳附加檔案
  • 不可以編輯自己的文章
  •