From: Mark Wooding Date: Fri, 8 Jun 2012 00:28:45 +0000 (+0100) Subject: radius.m4: Handy ipset hook for ad-hoc safe/unstrusted exceptions. X-Git-Url: https://git.distorted.org.uk/~mdw/firewall/commitdiff_plain/a83c9611b4ea63ebe1432fad05593f23ae1d1f6b radius.m4: Handy ipset hook for ad-hoc safe/unstrusted exceptions. --- diff --git a/radius.m4 b/radius.m4 index 4bf4cea..ecf64b7 100644 --- a/radius.m4 +++ b/radius.m4 @@ -53,6 +53,18 @@ dnsresolver inbound run iptables -A inbound -j ACCEPT \ -p $proto_ipv6 -s 216.66.80.26 +## Permitted special forwarding. +makeset fwd-allow-http nethash || : +iptables -A fwd-spec-nofrag -j ACCEPT \ + -m set --match-set fwd-allow-http dst \ + -p tcp --destination-port $port_http \ + -m mark --mark $to_untrusted/$MASK_TO +iptables -A fwd-spec-nofrag -j ACCEPT \ + -m set --match-set fwd-allow-http src \ + -p tcp --destination-port $port_http \ + -m mark --mark $from_untrusted/$MASK_FROM \ + -m state --state ESTABLISHED + ## NAT for RFC1918 addresses. for i in PREROUTING OUTPUT POSTROUTING; do run iptables -t nat -P $i ACCEPT 2>/dev/null || :