Matthew LaFalce
Posted on March 9, 2022
Here is a small post to help you find the outgoing IP address of you Linux machine.
- To find the outgoing internal IP address only
ip route get 8.8.8.8 | head -1 | gawk '{ print $7 }'
- To find the outgoing internal IP address along with the interface name.
ip route get 8.8.8.8 | head -1 | gawk '{ print $5,$7 }'
- In the case that your machine is connected to the internet, to find the outgoing external IP Address.
curl ifconfig.me
💖 💪 🙅 🚩
Matthew LaFalce
Posted on March 9, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.