VPS Networking Basics: DNS, Ports, and IP Configuration Explained

Published on

Essential networking knowledge for VPS owners. Covers DNS management, port configuration, IP addresses, reverse DNS, and common networking tasks.

Written by Space-Node Team – Infrastructure Team – 15+ years combined experience in game server hosting, VPS infrastructure, and 24/7 streaming solutions. Read author bio →

Running a VPS means managing network configuration. Here's what every VPS owner needs to know about DNS, ports, and IP addresses.

IP Addresses

IPv4 vs IPv6

| Feature | IPv4 | IPv6 | |---------|------|------| | Format | 185.xxx.xxx.xxx | 2a0a:xxxx:xxxx::1 | | Addresses available | Limited (running out) | Virtually unlimited | | NAT required | Often | Never | | Configuration | Standard | Growing adoption |

Most VPS providers assign at least one IPv4 and one IPv6 address.

Check Your IPs

# IPv4
curl -4 ifconfig.me

# IPv6
curl -6 ifconfig.me

# All network interfaces
ip addr show

DNS Management

Record Types

| Record | Purpose | Example | |--------|---------|---------| | A | Points domain to IPv4 | example.com -> 185.x.x.x | | AAAA | Points domain to IPv6 | example.com -> 2a0a::1 | | CNAME | Alias to another domain | www -> example.com | | MX | Mail server | mail.example.com | | TXT | Text data (SPF, DKIM, verification) | v=spf1 include:... | | NS | Nameserver | ns1.provider.com | | SRV | Service location | Specific service endpoints |

Setting Up DNS for Your VPS

  1. Buy a domain from a registrar
  2. Point the domain's A record to your VPS IP
  3. Wait for propagation (usually 5-30 minutes, up to 48 hours)
example.com      A       185.xxx.xxx.xxx
www.example.com  CNAME   example.com

Verify DNS

# Check A record
dig example.com A +short

# Check all records
dig example.com ANY

# Check propagation worldwide
dig @8.8.8.8 example.com
dig @1.1.1.1 example.com

Port Management

Common Ports

| Port | Service | Protocol | |------|---------|----------| | 22 | SSH | TCP | | 80 | HTTP | TCP | | 443 | HTTPS | TCP | | 25 | SMTP | TCP | | 3306 | MySQL | TCP | | 5432 | PostgreSQL | TCP | | 6379 | Redis | TCP | | 8080 | HTTP alternate | TCP |

Firewall Rules

# See current rules
sudo ufw status verbose

# Allow a port
sudo ufw allow 3000/tcp

# Allow from specific IP only
sudo ufw allow from 192.168.1.100 to any port 3306

# Deny a port
sudo ufw deny 8080/tcp

# Delete a rule
sudo ufw delete allow 3000/tcp

Only Expose What's Needed

| Service | Should Be Public? | Firewall Rule | |---------|-------------------|--------------| | Web server (80, 443) | Yes | Allow from anywhere | | SSH | Yes (restricted) | Allow from your IP or all | | Database | No | Allow from localhost only | | Redis | No | Allow from localhost only | | Admin panels | No | Allow from your IP only |

Binding to Localhost

For services that shouldn't be public:

# MySQL - bind to localhost only
# /etc/mysql/mariadb.conf.d/50-server.cnf
bind-address = 127.0.0.1

# Redis - bind to localhost only
# /etc/redis/redis.conf
bind 127.0.0.1

Reverse DNS (rDNS)

Reverse DNS maps an IP address back to a domain name. Essential for email:

  • Without rDNS: Email servers reject your emails as potential spam
  • With rDNS: Your VPS IP resolves to your domain, improving email deliverability

Set up rDNS through your VPS provider's control panel.

HTTPS with Let's Encrypt

sudo apt install certbot
# For Nginx
sudo certbot --nginx -d example.com -d www.example.com
# For Apache
sudo certbot --apache -d example.com -d www.example.com

Certbot automatically handles renewal.

Network Performance

| Test | Command | |------|---------| | Download speed | wget -O /dev/null http://speedtest.tele2.net/10MB.zip | | Latency | ping -c 10 google.com | | Traceroute | traceroute google.com | | DNS resolution speed | dig google.com \| grep "Query time" |

Space-Node's VPS hosting connects directly to major internet exchanges with 1 Gbps connectivity. Low latency to all European networks and excellent global routing.

Space-Node Team

About the Author

Space-Node Team – Infrastructure Team – Experts in game server hosting, VPS infrastructure, and 24/7 streaming solutions with 15+ years combined experience.

Since 2023
500+ servers hosted
4.8/5 avg rating

Our team specializes in Minecraft, FiveM, Rust, and 24/7 streaming infrastructure, operating enterprise-grade AMD Ryzen 9 hardware in Netherlands datacenters. We maintain GDPR compliance and ISO 27001-aligned security standards.

View Space-Node's full team bio and credentials →

Launch Your VPS Today

Get started with professional VPS hosting powered by enterprise hardware. Instant deployment and 24/7 support included.

VPS Networking Basics: DNS, Ports, and IP Configuration Explained