From a83c9611b4ea63ebe1432fad05593f23ae1d1f6b Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Fri, 8 Jun 2012 01:28:45 +0100 Subject: [PATCH] radius.m4: Handy ipset hook for ad-hoc safe/unstrusted exceptions. --- radius.m4 | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 || : -- 2.11.0