IP /

My IP Address


To determine your current public IP address, you can run:

$ dig +short myip.opendns.com @resolver1.opendns.com


dig TXT +short o-o.myaddr.l.google.com @ns1.google.com

This will tell you at least one of your public IP addresses.

Check DNS records

If you have DNS setup, you can also run

$ host username.example.com

You'll want to replace username.example.com with your real domain.

Check ifconfig

If you have multiple IP addresses, you might find more information using ifconfig:

$ ifconfig

Look for lines that begin with inet, such as:

        inet netmask 0xffffff00 broadcast

This line will tell you the IP addresses your system has. is localhost, which always refers to the machine itself, so it is not a public IP address. Likewise, and are not publicly reachable IP addresses.

Once you find your IP address, look for the interface name, a which is made of a few letter followed by a number. If OpenBSD is run on a virtual machine, the external interface is probably vio0.

You can learn more about the device driver for the interface by typing the interface name without the number:

$ man vio

Replace vio with your interface.