X-Git-Url: https://git.distorted.org.uk/~mdw/firewall/blobdiff_plain/f656160243550acb5f02d53acdf7750cfbade2a8..490003e407d54c7f4c8612836bb601f6883c191f:/radius.m4 diff --git a/radius.m4 b/radius.m4 index 4bf4cea..180b8ac 100644 --- a/radius.m4 +++ b/radius.m4 @@ -28,19 +28,10 @@ m4_divert(86)m4_dnl ## Externally visible services. allowservices inbound tcp \ ident \ - dns iodine \ ssh allowservices inbound udp \ - dns iodine \ tripe -## Provide DNS resolution to local untrusted hosts. -for p in tcp udp; do - run iptables -A inbound -j ACCEPT \ - -s 172.29.198.0/24 \ - -p $p --destination-port $port_dns -done - ## Provide syslog for evolution. run iptables -A inbound -j ACCEPT \ -s 172.29.198.2 \ @@ -48,11 +39,24 @@ run iptables -A inbound -j ACCEPT \ ## Other interesting things. dnsresolver inbound +dnsserver inbound ## IPv6 6-in-4 tunnel. 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 || :