Skip to main content
To find your server’s IP address on Linux, run ip -br addr (or hostname -I for just the addresses). On Windows Server, run ipconfig in PowerShell or Command Prompt, or Get-NetIPAddress -AddressFamily IPv4. On a FREAKHOSTING VPS you can also see every assigned IPv4 and IPv6 address on the Network tab of the VPS Panel, without logging in to the server.

Before you start

How to find your IP address on Linux

1

List addresses

Each line is a network interface. The public one is usually eth0, ens3 or enp1s0. The number after / is the prefix length (network size).
2

Show only the addresses

This prints every address except loopback, separated by spaces.
3

Show IPv4 or IPv6 only

scope global hides 127.0.0.1 and link-local fe80:: addresses, which aren’t reachable from the internet.

How to find the default gateway and DNS servers

203.0.113.1 is the gateway: the router your server sends internet traffic through. To see which DNS servers the server uses, run resolvectl status on Ubuntu, or cat /etc/resolv.conf on other distributions. See change DNS resolvers on Linux.

How to find your IP address on Windows Server

For a summary with gateway and DNS servers:

Public or private address?

If the only address you see is private or starts with 169.254., the server either sits behind NAT or failed to get its network settings. Compare with the address shown in the VPS Panel, and if they differ, check the server’s network configuration (see set a static IP with Netplan).
Docker, VPNs and other software add their own interfaces with private addresses, for example docker0 with 172.17.0.1. These are normal and are not your public IP.

Frequently asked questions

Why does hostname -I show several addresses?

It lists every address on every interface: your public IPv4, IPv6, and private addresses from Docker or a VPN. Use ip -br addr to see which interface each belongs to.

How do I find my IPv6 address?

Run ip -6 addr show scope global on Linux or Get-NetIPAddress -AddressFamily IPv6 on Windows. If nothing global appears, IPv6 isn’t configured: see configure IPv6 on Linux or enable IPv6 on Windows Server.

Is ifconfig still available?

ifconfig comes from the old net-tools package, which many current distributions no longer install. Use ip addr, which is part of iproute2 and installed by default.

How do I find the IP address of my own computer, to allow it in a firewall?

Your home public IP is the address your router uses on the internet, not the 192.168.x.x address on your PC. Your router’s status page shows it.

VPS and dedicated server guides

Every guide in this section.

VPS network settings

Addresses, gateway and netmask in the panel.

Point a domain to your server

Create A and AAAA records.

Add more IP addresses

Configure a second IP on Linux.

Set a static IP with Netplan

Fix the address in the network config.

Checked against the Ubuntu Server networking documentation and Microsoft Learn (ipconfig, Get-NetIPAddress) on 4 November 2026; Linux commands tested on Ubuntu 24.04 LTS. Commands can differ on other distributions or releases.

Need Extra Help?

If you encounter any issues, our support team is ready to assist:

Save on Your Hosting

Ready to upgrade your hosting? Use code KB20 at checkout for 20% off your first order!

Last Updated: November 2026