## 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 \
## 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 || :