This has been some real trouble because multiple rules could
not be properly inserted into the rule chains in the kernel
because the chains did not exist, yet.
iptables -t nat -N REDNAT
iptables -t nat -A POSTROUTING -j REDNAT
iptables -t nat -N REDNAT
iptables -t nat -A POSTROUTING -j REDNAT
# Custom prerouting chains (for transparent proxy)
iptables -t nat -N SQUID
iptables -t nat -A PREROUTING -j SQUID
# Custom prerouting chains (for transparent proxy)
iptables -t nat -N SQUID
iptables -t nat -A PREROUTING -j SQUID
iptables -N POLICYOUT
iptables -A OUTPUT -j POLICYOUT
iptables -N POLICYOUT
iptables -A OUTPUT -j POLICYOUT
+ # Initialize firewall policies.
/usr/sbin/firewall-policy
/usr/sbin/firewall-policy
- # read new firewall
- /usr/local/bin/firewallctrl
+ # Install firewall rules for the red interface.
+ iptables_red