mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-11 19:55:52 +02:00
Captive-Portal: add captive chains to firewall initscript
When loading the initscript of the firewall the neccessary chains for the captive portalneed to be created. Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
4d9002279f
commit
bbaa3613b4
@@ -224,6 +224,13 @@ iptables_init() {
|
||||
iptables -A ${i} -j LOOPBACK
|
||||
done
|
||||
|
||||
# Captive portal
|
||||
iptables -N CAPTIVE_PORTAL
|
||||
iptables -N CAPTIVE_PORTAL_CLIENTS
|
||||
for i in INPUT FORWARD; do
|
||||
iptables -A ${i} -j CAPTIVE_PORTAL
|
||||
done
|
||||
|
||||
# Accept everything connected
|
||||
for i in INPUT FORWARD OUTPUT; do
|
||||
iptables -A ${i} -j CONNTRACK
|
||||
@@ -337,6 +344,10 @@ iptables_init() {
|
||||
iptables -N UPNPFW
|
||||
iptables -A FORWARD -m conntrack --ctstate NEW -j UPNPFW
|
||||
|
||||
# Captive Portal
|
||||
iptables -t nat -N CAPTIVE_PORTAL
|
||||
iptables -t nat -A PREROUTING -j CAPTIVE_PORTAL
|
||||
|
||||
# RED chain, used for the red interface
|
||||
iptables -N REDINPUT
|
||||
iptables -A INPUT -j REDINPUT
|
||||
|
||||
Reference in New Issue
Block a user