File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
roles/network/templates/gateway Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ if [ "$gw_block_https" == "True" ]; then
105105fi
106106
107107# Allow outgoing connections from the LAN side.
108- if ! [ " $captive_portal_enabled " == " True" ]; then
108+ if ! [ " $py_captive_portal_enabled " == " True" ]; then
109109 $IPTABLES -A FORWARD -i $lan -o $wan -j ACCEPT
110110fi
111111# Don't forward from the outside to the inside.
@@ -117,13 +117,13 @@ if [ "$block_DNS" == "True" ];then
117117 $IPTABLES -t nat -A PREROUTING -i $lan -p udp --dport 53 ! -d {{ lan_ip }} -j DNAT --to {{ lan_ip }}:53
118118fi
119119
120- # if [ "$captive_portal_enabled" == "True" ];then
121- # $IPTABLES -t mangle -N internet
122- # $IPTABLES -t mangle -A PREROUTING -i {{ iiab_lan_iface }} -p tcp -m tcp --dport 80 -j internet
123- # $IPTABLES -t mangle -A internet -j MARK --set-mark 99
124- # $IPTABLES -t nat -A PREROUTING -i {{ iiab_lan_iface }} -p tcp -m mark --mark 99 -m tcp --dport 80 -j DNAT --to-destination {{ lan_ip }}:
125-
126120if [ " $captive_portal_enabled " == " True" ]; then
121+ $IPTABLES -t mangle -N internet
122+ $IPTABLES -t mangle -A PREROUTING -i {{ iiab_lan_iface }} -p tcp -m tcp --dport 80 -j internet
123+ $IPTABLES -t mangle -A internet -j MARK --set-mark 99
124+ $IPTABLES -t nat -A PREROUTING -i {{ iiab_lan_iface }} -p tcp -m mark --mark 99 -m tcp --dport 80 -j DNAT --to-destination {{ lan_ip }}:
125+
126+ elif [ " py_$captive_portal_enabled " == " True" ]; then
127127 $IPTABLES -t nat -A PREROUTING -i $lan -p tcp --dport 80 ! -d {{ lan_ip }} -j DNAT --to {{ lan_ip }}:9090
128128
129129elif [ " $HTTPCACHE_ON " == " True" ]; then
You can’t perform that action at this time.
0 commit comments