Reply To: How to enable Captive portal more than one interfaces?

Home Page Forums Network Management ZeroShell How to enable Captive portal more than one interfaces? Reply To: How to enable Captive portal more than one interfaces?

#48265

giancagianca
Member

Today I looked at the script. Captive portal is enabled in /root/kerbynet.cgi/scripts/cp_start

if [ “$MODE” == Bridged ] ; then
iptables -A CapPort -m physdev –physdev-in $INTERFACE -j CapPortACL
iptables -t nat -A CapPort -m physdev –physdev-in $INTERFACE -p tcp –dport 80 -j CapPortHTTP
iptables -t nat -A CapPort -m physdev –physdev-in $INTERFACE -p tcp –dport 443 -j CapPortHTTPS
## iptables -t nat -A CapPort -m physdev –physdev-in $INTERFACE -p tcp –dport $GWPORT -j CapPortGW
## iptables -t nat -A CapPort -m physdev –physdev-in $INTERFACE -p tcp –dport $GWPORTSSL -j CapPortGW
iptables -t nat -A CapPort -m physdev –physdev-in $INTERFACE -p tcp –dport $REMOTEPT -j CapPortGW
iptables -t nat -A CapPort -m physdev –physdev-in $INTERFACE -p tcp –dport $REMOTESSL -j CapPortGW
else
iptables -A CapPort -i $INTERFACE -j CapPortACL
iptables -t nat -A CapPort -i $INTERFACE -p tcp –dport 80 -j CapPortHTTP
iptables -t nat -A CapPort -i $INTERFACE -p tcp –dport 443 -j CapPortHTTPS
## iptables -t nat -A CapPort -i $INTERFACE -p tcp –dport $GWPORT -j CapPortGW
## iptables -t nat -A CapPort -i $INTERFACE -p tcp –dport $GWPORTSSL -j CapPortGW
iptables -t nat -A CapPort -i $INTERFACE -p tcp –dport $REMOTEPT -j CapPortGW
iptables -t nat -A CapPort -i $INTERFACE -p tcp –dport $REMOTESSL -j CapPortGW
fi
if [ “$WEBLOGIN” == Remote ] ; then
iptables -A CapPortACL -d $REMOTEIP -p tcp –dport $REMOTEPT -j ACCEPT
iptables -A CapPortACL -d $REMOTEIP -p tcp –dport $REMOTESSL -j ACCEPT
fi

INTERFACE is selection in web configuration.

You can add new section witch enable captive portal on other interface.

If you want to make permanent changes http://www.zeroshell.net/forum/viewtopic.php?t=382

bye