[問題] 限制主機對外連線

看板Linux作者 (史馬特)時間6年前 (2017/09/08 16:36), 編輯推噓0(007)
留言7則, 4人參與, 最新討論串1/1
想請問前輩們, 限制外面連入主機的ip可設定 /etc/hosts.allow /etc/hosts.deny 如果相反的, 要去限制主機對外連線該如何設定?? (僅開放主機能對特定IP傳輸資料, 其餘關閉) -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.112.17.100 ※ 文章網址: https://www.ptt.cc/bbs/Linux/M.1504859790.A.D4C.html

09/08 16:48, , 1F
這兩個檔案是TCP wrapper用的 非TCP就無效吧
09/08 16:48, 1F

09/08 16:50, , 2F
說是"連線"應該可指各種連線? 用iptables/firewall
09/08 16:50, 2F

09/08 17:02, , 3F
ipset設一下允許+封鎖清單 然後在iptable加規則
09/08 17:02, 3F

09/08 17:02, , 4F
iptables(上面少打一個s
09/08 17:02, 4F

09/09 05:30, , 5F
iptable全封,需要的再開就好
09/09 05:30, 5F

09/13 18:42, , 6F
iptables,iptables,iptables
09/13 18:42, 6F

09/13 18:42, , 7F
看看鳥哥吧
09/13 18:42, 7F
文章代碼(AID): #1PibQErC (Linux)