My IP Address
Use DNS
To determine your current public IP address, you can run:
$ dig +short myip.opendns.com @resolver1.opendns.com
or:
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 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
This line will tell you the IP addresses your system has. 127.0.0.1 is localhost, which always refers to the machine itself, so it is not a public IP address. Likewise, 192.168.0.0/16 and 10.0.0.0/8 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.