[firewall6] s/DROP/REJECT/g
Ignore-this: 1831804fe846ba8186466adadba594c5 darcs-hash:20121004021220-3a55a-0c84daf10f4a414e8e7548dbfcfa0f22ef731c4b.gz
This commit is contained in:
parent
c6b1c08697
commit
871cf91d7b
1 changed files with 6 additions and 6 deletions
|
@ -87,7 +87,7 @@ def ports(dev_ip6, dev_crans):
|
|||
def basic_fw():
|
||||
''' Met en place un firewall de base commun à tous les serveurs'''
|
||||
# On rejete les ra.
|
||||
ip6tables.filter.input('-p icmpv6 -m icmp6 --icmpv6-type router-advertisement -j DROP')
|
||||
ip6tables.filter.input('-p icmpv6 -m icmp6 --icmpv6-type router-advertisement -j REJECT')
|
||||
|
||||
# On ne vérifie rien sur les ip qui ne sont pas dans notre prefix
|
||||
ip6tables.filter.ieui64('! -s %s -j RETURN' % prefix['subnet'][0])
|
||||
|
@ -175,7 +175,7 @@ def main_router():
|
|||
ip6tables.filter.feui64('-s %s -m mac --mac-source %s -j RETURN' %
|
||||
(prefix['wifi'][0], mac_wifi))
|
||||
ip6tables.filter.feui64('-s %s -m eui64 -j RETURN' % prefix['fil'][0])
|
||||
ip6tables.filter.feui64('-j DROP')
|
||||
ip6tables.filter.feui64('-j REJECT')
|
||||
|
||||
# Rien ne passe vers adm
|
||||
# est ce que du local est gêné par le règle ?
|
||||
|
@ -184,10 +184,10 @@ def main_router():
|
|||
# on accepte les ping
|
||||
for icmpv6 in authorized_icmpv6:
|
||||
ip6tables.filter.forward('-p icmpv6 -m icmp6 --icmpv6-type %s -j ACCEPT' % icmpv6)
|
||||
ip6tables.filter.forward('-p icmpv6 -j DROP')
|
||||
ip6tables.filter.forward('-p icmpv6 -j REJECT')
|
||||
|
||||
# cf https://www.sixxs.net/faq/connectivity/?faq=filters
|
||||
ip6tables.filter.forward('-m rt --rt-type 0 -j DROP')
|
||||
ip6tables.filter.forward('-m rt --rt-type 0 -j REJECT')
|
||||
|
||||
# Ouverture des ports
|
||||
ports(dev_ip6, dev_crans)
|
||||
|
@ -206,7 +206,7 @@ def wifi_router():
|
|||
dev_wifi = iface6('wifi')
|
||||
|
||||
# Stop aux RA
|
||||
ip6tables.filter.forward('-p icmpv6 -m icmp6 --icmpv6-type router-advertisement -j DROP')
|
||||
ip6tables.filter.forward('-p icmpv6 -m icmp6 --icmpv6-type router-advertisement -j REJECT')
|
||||
|
||||
# Un peu moche, mais il faut supprimer les dernière règles dans IEUI64
|
||||
# avant de rajouter la règle pour les machines wifi.
|
||||
|
@ -221,7 +221,7 @@ def wifi_router():
|
|||
type_m.upper()))
|
||||
ip6tables.filter.feui64('-s %s -m eui64 -j RETURN'
|
||||
% prefix[type_m][0])
|
||||
ip6tables.filter.feui64('-j DROP')
|
||||
ip6tables.filter.feui64('-j REJECT')
|
||||
|
||||
ip6tables.filter.forward('-m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue