From: Mark Wooding Date: Thu, 8 Mar 2012 18:57:42 +0000 (+0000) Subject: Merge branch 'master' into emergency X-Git-Url: https://git.distorted.org.uk/~mdw/firewall/commitdiff_plain/5caa9a42c1968d16a315fafc95297e2338804895?hp=677ef44ed3d745abddbb192ca4d53778819ffe6c Merge branch 'master' into emergency * master: classify.m4: Reject the RFC5737 documentation-only addresses. --- diff --git a/local.m4 b/local.m4 index 2d9cacb..8f39161 100644 --- a/local.m4 +++ b/local.m4 @@ -90,12 +90,13 @@ defhost artist iface eth1 dmz unsafe defhost vampire router - iface eth0.0 dmz unsafe - iface eth0.1 dmz unsafe - iface eth0.3 untrusted + iface eth0.0 dmz unsafe default + iface eth0.1 dmz unsafe default + iface eth0.3 untrusted default iface dns0 dns iface vpn-+ vpn iface vpn-precision colobdry vpn + iface t6-he default defhost ibanez iface br-dmz dmz unsafe iface br-unsafe unsafe diff --git a/numbers.m4 b/numbers.m4 index d5ab0c1..c94ae5f 100644 --- a/numbers.m4 +++ b/numbers.m4 @@ -49,6 +49,7 @@ defport rsync 873 defport imaps 993 defport h323 1720 defport squid 3128 +defport rdesktop 3389 defport tripe 4070 defport siplo 5000 defport siphi 5100 diff --git a/vampire.m4 b/vampire.m4 index fa79ee2..4e00a49 100644 --- a/vampire.m4 +++ b/vampire.m4 @@ -31,6 +31,7 @@ allowservices inbound tcp \ dns iodine \ ssh \ smtp submission \ + rdesktop \ gnutella_svc \ ftp ftp_data \ rsync \ @@ -70,5 +71,38 @@ run iptables -A OUTPUT -m multiport \ dnsresolver inbound ntpclient inbound $ntp_servers +## IPv6 6-in-4 tunnel. +run iptables -A inbound -j ACCEPT \ + -p $proto_ipv6 -s 216.66.80.26 + +## NAT for RFC1918 addresses. +for i in PREROUTING OUTPUT POSTROUTING; do + run iptables -t nat -P $i ACCEPT 2>/dev/null || : + run iptables -t nat -F $i 2>/dev/null || : +done +run iptables -t nat -F +run iptables -t nat -X + +run iptables -t nat -N outbound +run iptables -t nat -A outbound -j RETURN ! -o eth0.0 +run iptables -t nat -A outbound -j RETURN ! -s 172.29.198.0/23 +run iptables -t nat -A outbound -j RETURN -d 62.49.204.144/28 +run iptables -t nat -A outbound -j RETURN -d 172.29.198.0/23 +run iptables -t nat -A outbound -j SNAT --to-source 62.49.204.158 +run iptables -t nat -A POSTROUTING -j outbound + +## Set up NAT protocol helpers. In particular, SIP needs some special +## twiddling. +run modprobe nf_conntrack_sip \ + ports=5060 \ + sip_direct_signalling=0 \ + sip_direct_media=0 +for p in ftp sip h323; do + run modprobe nf_nat_$p +done + +## Forbid anything complicated to the NAT address. +run iptables -A INPUT -d 62.49.204.158 ! -p icmp -j REJECT + m4_divert(-1) ###----- That's all, folks --------------------------------------------------