I recently deployed a droplet on vultr and i need to find the external and internal IP addresses. I have just one IP (which i presume to be the external IP or not). How and/or where do i locate the two IPs? The server is running on ubuntu

  • ifconfig is your friend, that is, when Ubuntu runs on ...some hardware. – mikewhatever Jun 25 at 22:02
  • I would likely use ip addr (esp. if ifconfig is not installed) – guiverc Jun 25 at 22:56
  • Welcome to Ask Ubuntu. – chili555 Jun 25 at 23:38

There's a simple command to get all IP info, and it tells you if it's local (internal) or global (external)

Just run:

sudo ifconfig

And presto, you'll know all you wanted to and more


To get your internet (WAN) IP address: wget -qO- ifconfig.me/ip

To get your internal (LAN) ip address(es): ip addr | grep inet


From the command prompt, to find your internal IP address:

ip addr show

You may get a result something like:

3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 5c:c5:d4:0e:64:a6 brd ff:ff:ff:ff:ff:ff
    inet brd scope global dynamic noprefixroute wlp3s0
       valid_lft 172442sec preferred_lft 172442sec
    inet6 2600:1700:xxxx:83d:b472:9320:xxxx:4df5/64 scope global temporary dynamic 
       valid_lft 604444sec preferred_lft 85834sec
    inet6 2600:1700:xxxx:83d:fb6b:19ca:xxxx:5e6/64 scope global dynamic mngtmpaddr noprefixroute 

In this case, my IPv4 address, given by my router, is

To find your public IP address:

curl https://ipinfo.io/ip

You should get a reply like:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.