Update myip alias to work from a VPN

This commit is contained in:
Fernando Schauenburg 2019-09-18 21:50:42 +02:00
parent c034066e7a
commit 8771e3a4d0

View file

@ -137,7 +137,14 @@ bashrc_customize_aliases() {
alias path='echo $PATH | tr -s ":" "\n"'
alias mpath='echo $MANPATH | tr -s ":" "\n"'
alias myip="dig +short myip.opendns.com @resolver1.opendns.com"
# A few options to get public IP address on command line. The dig solution
# below using the OpenDNS resolver doesn't work when connected to
# ExpressVPN because all DNS requests are handled by the ExpressVPN DNS
# servers and the OpenDNS DNS resolver is blocked.
alias myip="curl https://ifconfig.co"
#alias myip="curl https://ifconfig.me"
#alias myip="dig +short myip.opendns.com @resolver1.opendns.com"
alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date'
alias tree="bashrc_tree"
alias ltree="bashrc_paged_tree"