added HTTP port to port forwarding rules

This commit is contained in:
nachoparker 2017-07-27 12:40:26 +02:00
parent dd18897475
commit 3ee3a28219

View File

@ -14,7 +14,8 @@
# More at: https://ownyourbits.com
#
PORT_=443
HTTPSPORT_=443
HTTPPORT_=80
DESCRIPTION="Set port forwarding to access from outside (UPnP)"
show_info()
@ -41,8 +42,10 @@ configure()
{
local IFACE=$( ip r | grep "default via" | awk '{ print $5 }' )
local IP=$( ip a | grep "global $IFACE" | grep -oP '\d{1,3}(.\d{1,3}){3}' | head -1 )
upnpc -d $PORT_ TCP
upnpc -a $IP 443 $PORT_ TCP
upnpc -d $HTTPSPORT_ TCP
upnpc -d $HTTPPORT_ TCP
upnpc -a $IP 443 $HTTPSPORT_ TCP
upnpc -a $IP 80 $HTTPPORT_ TCP
}
cleanup()