請問LINUX要如何只讓特定使用者上網??



贊助商連結


aresx
2012-06-12, 03:08 PM
請問LINUX要如何只讓特定使用者上網??

我是用CentOS 6.2

只想讓特定使用者上網, 例如root

請問我該怎麼設定

謝謝~~

贊助商連結


twu2
2012-06-12, 03:39 PM
iptables + ipt_owner/xt_owner

aresx
2012-06-12, 06:05 PM
iptables + ipt_owner/xt_owner

感謝您的答覆
請問iptables的話 是用-m owner --uid-owner嗎?
ipt_owner/xt_owner我不大熟
請問該如何設定相關參數呢? 謝謝~~

mis339
2012-06-12, 06:09 PM
話說,以前某客戶有這樣的需求。
我的做法是比較笨的,就是不給Gateway,然後在特定使用者的啟動中加入給Gateway的指令。
不知Linux 能不能這樣做。

twu2
2012-06-13, 08:38 AM
那兩個參數應該是載入 xt_owner 模組之後才有的. (就是同一個東西啦)
舊的核心應該會叫 ipt_owner (不知道在那一版之後改成 xt_owner, 其實也是同一個東西).

chiher
2013-01-14, 04:59 PM
iptables -A OUTPUT -p tcp -s 欲限制的ip --dport 80 -j DROP