Skip to content

Commit

Permalink
Use only first IPv4 address of VIRT_NET_DEV
Browse files Browse the repository at this point in the history
  • Loading branch information
pschmitt committed Nov 2, 2016
1 parent 0223b54 commit db0668c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pia-tools
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ new_client_id() {
request_port() {
local username="$(head -1 $PIA_PASSWD_FILE)"
local passwd="$(tail -1 $PIA_PASSWD_FILE)"
local local_vpn_ip="$(ip addr show $VIRT_NET_DEV | grep inet | awk '{ print $2 }')"
local local_vpn_ip="$(ip addr show $VIRT_NET_DEV | awk '/inet / { print $2; exit}')"
local client_id="$1"
[[ -z "$local_vpn_ip" ]] && local_vpn_ip=$LOCAL_IP
echo -n "Updating port forwarding... "
Expand Down

0 comments on commit db0668c

Please sign in to comment.