Tags:
create new tag
, view all tags

Bloquer les entrées/sorties réseau d'une machine (sauf SSH)

Pour bloquer toute communication sauf celles du port 22 :
iptables-save > /tmp/iptables.sav

iptables -F
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP
iptables -A INPUT -i eth0 -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --sport 22 -j ACCEPT
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
iptables -A OUTPUT -p tcp --dport 22 -j ACCEPT

iptables-restore < /tmp/iptables.sav
Topic revision: r2 - 2009-06-29 - VincentMeslard
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback