You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Like many people, I have an ISP (Comcast/Xfinity) where my internal network is private behind the public IP address that the ISP provides. The script isn't useful in its current form because it is obtaining the IP address of the local machine and for that local machine is a non-routable private address. Below is what I did, I did not have permissions to push a topic branch and create a PR.
I updated the script as follows for my needs:
Added the -r option. This takes an argument in the form of "v4" or "v6" which maps to using v4.ident.me or v6.ident.me servers used to look up the public facing IP address for my network.
identme_ver=
while getopts "hH:i:p:r:u:vV" opt; do
case $opt in
h)
usage
;;
H)
custom_host="$custom_host $OPTARG"
;;
i)
local_interface_addr=$OPTARG
;;
p)
YDNS_PASSWD=$OPTARG
;;
u)
YDNS_USER=$OPTARG
;;
r)
identme_ver=$OPTARG
;;
v)
show_version
;;
V)
verbose=1
;;
esac
done
If -r [v4|v6] is specified, use ident.me for the current_ip lookup:
if [ "$identme_ver" != "" ]; then
# Obtain current address via ident.me
current_ip=$(curl -s ${identme_ver}.ident.me)
elif [ "$local_interface_addr" != "" ]; then
# Retrieve current local IP address for a given interface
if hash ip 2>/dev/null; then
current_ip=$(ip addr | awk '/inet/ && /'${local_interface_addr}'/{sub(/\/.*$/,"",$2); print $2}')
fi
fi
The text was updated successfully, but these errors were encountered:
Like many people, I have an ISP (Comcast/Xfinity) where my internal network is private behind the public IP address that the ISP provides. The script isn't useful in its current form because it is obtaining the IP address of the local machine and for that local machine is a non-routable private address. Below is what I did, I did not have permissions to push a topic branch and create a PR.
I updated the script as follows for my needs:
The text was updated successfully, but these errors were encountered: