Understanding Your Server's Network Configuration
Knowing how to read and manage your server's network settings is essential for troubleshooting and configuration.
View Network Interfaces
ip addr show
Look for your main network interface (typically eth0, ens3, or enp3s0). Your public IP will be listed next to inet.
View the Routing Table
ip route show
Check DNS Configuration
cat /etc/resolv.conf
View Open Ports and Active Connections
ss -tulpn
Test Internet Connectivity
ping -c 4 8.8.8.8
Test DNS Resolution
nslookup yourdomain.com
dig yourdomain.com
Check Bandwidth Usage
apt install vnstat -y
vnstat -l # Live bandwidth monitor
vnstat -d # Daily usage summary