From 8771e3a4d003aaa910ce80c800e7c1da4af59af0 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Wed, 18 Sep 2019 21:50:42 +0200 Subject: [PATCH] Update myip alias to work from a VPN --- dotfiles/.bashrc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dotfiles/.bashrc b/dotfiles/.bashrc index 9ba10f5..d686f1b 100644 --- a/dotfiles/.bashrc +++ b/dotfiles/.bashrc @@ -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"