Created
December 20, 2016 23:45
-
-
Save wknowles/0b71c774eec034139f202b9f2a07bf1b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# LowEndSpirit "What's my IP?" | |
# 07/10/13 | |
#By CSa | |
ipv6addr=$(ip addr show dev venet0 | sed -e's/^.*inet6 \([^ ]*\)\/.*$/\1/;t;d') | |
ipv4intr=$(ifconfig venet0:0 | grep 'inet addr' | cut -d ':' -f 2 | cut -d ' ' -f 1) | |
nodeaddr=$(wget -qO- ipecho.net/plain) | |
ports=${ipv4intr#*.*.*.} | |
echo Your external IPv6 address is: | |
echo $ipv6addr | |
echo | |
echo Your internal IPv4 address is: | |
echo $ipv4intr | |
echo | |
echo Your external IPv4 address is: | |
echo $nodeaddr | |
echo | |
echo Your LowEndSprit is reachable on these ports: | |
echo [$nodeaddr]:$ports\01 - $ports\20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment