mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-11 03:25:54 +02:00
firewall: Sort order in which chains are initialized.
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.
This commit is contained in:
@@ -196,8 +196,6 @@ iptables_init() {
|
||||
iptables -t nat -N REDNAT
|
||||
iptables -t nat -A POSTROUTING -j REDNAT
|
||||
|
||||
iptables_red
|
||||
|
||||
# Custom prerouting chains (for transparent proxy)
|
||||
iptables -t nat -N SQUID
|
||||
iptables -t nat -A PREROUTING -j SQUID
|
||||
@@ -226,10 +224,11 @@ iptables_init() {
|
||||
iptables -N POLICYOUT
|
||||
iptables -A OUTPUT -j POLICYOUT
|
||||
|
||||
# Initialize firewall policies.
|
||||
/usr/sbin/firewall-policy
|
||||
|
||||
# read new firewall
|
||||
/usr/local/bin/firewallctrl
|
||||
# Install firewall rules for the red interface.
|
||||
iptables_red
|
||||
}
|
||||
|
||||
iptables_red() {
|
||||
|
||||
Reference in New Issue
Block a user