reseaux_iptables
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédenteProchaine révisionLes deux révisions suivantes | ||
reseaux_iptables [2010/07/17 11:00] – thierry | reseaux_iptables [2010/07/17 11:09] – thierry | ||
---|---|---|---|
Ligne 38: | Ligne 38: | ||
# interface a autoriser | # interface a autoriser | ||
- | @def $LAN_IF = eth0 | + | @def $LAN_IF = eth0; |
+ | |||
# Politique par defaut: tout fermer | # Politique par defaut: tout fermer | ||
chain ( INPUT OUTPUT FORWARD ) policy DROP; | chain ( INPUT OUTPUT FORWARD ) policy DROP; | ||
+ | | ||
# autoriser l' | # autoriser l' | ||
chain INPUT if lo ACCEPT; | chain INPUT if lo ACCEPT; | ||
chain OUTPUT of lo ACCEPT; | chain OUTPUT of lo ACCEPT; | ||
+ | | ||
# autoriser quelques entrées | # autoriser quelques entrées | ||
- | chain INPUT if $LAN_IF mod state state ( NEW ESTABLISHED RELATED ) { | + | chain INPUT if $LAN_IF |
- | proto tcp dport ( http ftp ssh ) ACCEPT; | + | |
- | proto udp dport ( openvpn domain ) ACCEPT; | + | proto tcp dport ( http ftp ssh ) ACCEPT; |
- | proto icmp icmp-type echo-request ACCEPT; | + | proto udp dport ( openvpn domain ) ACCEPT; |
+ | proto icmp icmp-type echo-request | ||
+ | } | ||
+ | mod state state ( ESTABLISHED RELATED ) ACCEPT; | ||
} | } | ||
| |
reseaux_iptables.txt · Dernière modification : 2010/07/17 11:16 de thierry