Skip to content

Commit

Permalink
update protonvpn port forward assignment cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
binhex committed Sep 20, 2023
1 parent 077bcce commit 40937f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion run/root/getvpnport.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ function protonvpn_get_incoming_port() {
for protocol in ${protocol_list}; do

# create a port forward for udp/tcp port
port=$(natpmpc -g "${vpn_gateway_ip}" -a 0 0 "${protocol}" 60 | grep -P -o -m 1 '(?<=Mapped public port\s)\d+')
port=$(natpmpc -g "${vpn_gateway_ip}" -a 1 0 "${protocol}" 60 | grep -P -o -m 1 '(?<=Mapped public port\s)\d+')
if [ -z "${port}" ]; then
echo "[warn] Unable to assign an incoming port for protocol ${protocol}, returning 1 from function..."
return 1
Expand Down

0 comments on commit 40937f0

Please sign in to comment.