What is my IP address?
Question
I need to add an inbound rule to the aws security group that allows my IP to access port 8080. How do I know what is my IP?
Answer
Here are the commands to find your public IP address using various methods on different operating systems:
On Windows:
Using nslookup:
nslookup myip.opendns.com resolver1.opendns.com
Using PowerShell:
(Invoke-WebRequest -uri "http://ifconfig.me").Content
On macOS and Linux:
Using dig:
dig +short myip.opendns.com @resolver1.opendns.com
Using curl:
Using wget:
On All Systems:
Using Web Services:
Open a web browser and visit WhatIsMyIP, or IP Chicken, or ifconfig.me.
These commands will help you find your public IP address from various environments and tools.