How the network of a VPS works
A VPS sends its packets through a virtual network card into the host, where they are bridged or routed onto the data centre network, pass DDoS filtering and leave for the internet. You control everything from the virtual card inwards: addresses, routes, firewall and services. This guide follows one packet along that path and shows the Linux tools that let you watch each step.
Networking and security guide, updated 2026-12-03
What does the path from your server to the internet look like?
Simplified, a packet leaving your server crosses these stages:
- Your application writes to a socket; the Linux kernel builds TCP or UDP and IP headers.
- The kernel checks routes and the firewall, then hands the packet to the virtual network card.
- The KVM host receives it on a virtual port and bridges or routes it towards the physical network.
- Data centre switches and routers carry it to the edge, where traffic towards your address range is filtered for attacks.
- Transit and peering links carry it across the internet.
Incoming traffic takes the same path in reverse. The first two stages are entirely yours. The rest is shared infrastructure you do not configure but can observe with tools like mtr.
What is the virtual network card?
Inside the server, the network card is a virtio-net device: a paravirtualised NIC designed for virtual machines. Instead of emulating real hardware, the guest kernel and the host exchange packets through shared memory queues, which keeps overhead low.
Check it from inside:
$ ethtool -i eth0
driver: virtio_net
$ ip -s link show eth0The second command shows counters for bytes, packets, errors and drops. Rising error or drop counters point to a problem worth reporting to support; a steady zero is normal. Multi-queue virtio spreads packet processing across vCPUs, and ethtool -l eth0 shows how many queues are active.
The interface name (eth0, ens3, enp1s0) is chosen by the image and udev; it says nothing about speed or quality.
What happens on the host: bridging or routing?
On the host side, each virtual NIC is a tap device. The host either connects it to a software bridge, so your server looks like a machine on a shared network segment, or routes it, so the host acts as your gateway and forwards packets with its own routing table. Many clouds use routing with a /32 on IPv4 and a link-local gateway on IPv6, which is why you may see an onlink default route.
For you the difference shows up in only two places: the prefix length on your IPv4 address and the gateway that ip route prints. Either way, traffic from other customers never reaches your interface; isolation between servers is enforced by the host.
Because the host checks that packets carry your own address, you cannot send traffic from addresses that are not assigned to you. Your IPv6 /64 is fully usable; foreign source addresses are dropped.
What is connection tracking and why does it matter?
Linux remembers every flow that passes its firewall in the connection tracking table (conntrack). That is what makes rules like "allow replies to connections I opened" possible: the kernel matches each new packet against known flows and labels it new, established or related.
The table has a size limit. A busy proxy, a scan or an attack can fill it, and then new connections are dropped with messages such as nf_conntrack: table full, dropping packet in dmesg. Check current use against the limit:
sysctl net.netfilter.nf_conntrack_count net.netfilter.nf_conntrack_maxRaise the maximum in /etc/sysctl.d/ if your workload needs it, or exempt high-volume stateless traffic (such as a public DNS server) with a notrack rule in nftables. Network devices upstream track flows too, but the table you manage is the one in your own kernel.
How does DDoS filtering fit in front of your server?
Traffic to every server passes network DDoS filtering before it reaches the host. The filter watches for floods, such as huge volumes of UDP or SYN packets, and drops attack traffic while letting normal traffic through. It works without any setting on your side and covers all plans and cities.
Network filtering handles volume. Attacks that look like real requests, for example many valid HTTP requests to an expensive page, still need handling on the server: rate limits in nginx, fail2ban, caching, and a firewall that exposes only the ports you use. The DDoS filtering page explains what is covered, and the firewall guide covers the server side.
How do DHCP and cloud-init configure the network?
At first boot, cloud-init reads the configuration for your server and writes network files for the image: netplan on Ubuntu, NetworkManager connections on Rocky, Alma, Fedora and CentOS Stream. The interface may then use DHCP for IPv4, which always hands out your fixed address, and a static or router-advertised setup for IPv6.
See which tool manages the interface:
networkctl status eth0 # systemd-networkd
nmcli device show eth0 # NetworkManagerThe lease and the address never change while the server exists, so DHCP is not a source of surprise. If you prefer fixed files, see static network configuration. How a server gets its initial configuration data is a detail of the platform; build your setup on the files cloud-init leaves behind rather than on any particular metadata endpoint.
Why should you not block all ICMP?
ICMP carries the control messages of IP. Blocking ping requests is a matter of taste, but blocking ICMP entirely breaks real things:
- Path MTU discovery relies on "fragmentation needed" (IPv4) and "packet too big" (IPv6) messages. Without them, large transfers stall while small ones work.
- IPv6 itself uses ICMPv6 for neighbour discovery and router advertisements. Dropping it can take IPv6 offline completely.
- Troubleshooting with
ping,tracerouteandmtrbecomes guesswork.
A balanced nftables rule allows the useful types and rate-limits echo requests:
icmp type { destination-unreachable, time-exceeded, echo-request } limit rate 10/second accept
icmpv6 type { destination-unreachable, packet-too-big, time-exceeded, echo-request, nd-neighbor-solicit, nd-neighbor-advert, nd-router-advert } acceptufw allows the needed ICMP types by default in /etc/ufw/before.rules.
What are NIC offloads and should you touch them?
Offloads let the network driver and host do work that the kernel would otherwise do per packet: checksum calculation, splitting large sends into packets (TSO, GSO) and merging received packets (GRO). They save CPU and are on by default with virtio-net.
ethtool -k eth0 | grep -E "segmentation|receive-offload|checksum"Leave them on in normal use. Two exceptions: when capturing traffic, offloads make tcpdump show packets larger than the MTU, which is expected and not an error; and some tunnel or routing setups behave better with GRO switched off on one interface, with ethtool -K eth0 gro off. Test any change, since it resets on reboot unless you persist it in a systemd unit or a networkd .link file.
How do you inspect the stack with ip, ss and tcpdump?
Three tools cover almost every question:
# addresses, routes, neighbours
ip -br a; ip route; ip -6 route; ip neigh
# sockets: who listens, who is connected
ss -tulnp
ss -tn state established
# packets on the wire
tcpdump -ni eth0 port 443
tcpdump -ni eth0 icmp6Read them in order. If ip shows no default route, nothing else matters. If ss shows the service listening only on 127.0.0.1, the outside cannot reach it. If tcpdump sees incoming SYN packets but no replies, look at the firewall or the service. If it sees nothing at all, the problem is upstream: test the path with mtr and open a ticket with the output.
Questions about this guide
Can other customers see my traffic?
No. Each server has its own virtual port and the host keeps servers isolated, so other servers never receive your packets.
Is there a cloud firewall in front of my server?
There is network DDoS filtering, but no configurable cloud firewall. Filter ports on the server itself with ufw or nftables.
Do I need to configure DDoS filtering?
No. It is always active for every server, with nothing to switch on.
Why does tcpdump show packets bigger than 1500 bytes?
Segmentation and receive offloads let the kernel handle large chunks that the driver splits or merges. It is normal and not visible on the wire.
Can I use private networking between my servers?
There is no private network feature. Connect servers with an encrypted WireGuard link instead, as shown in private links with WireGuard.
Where do I report a network problem?
Open a support ticket with the server name and the output of mtr -rwc 100 towards the affected destination, run from both directions if you can.
More in Networking and security
- IPv4 and IPv6 addresses
- Add IPv6 addresses
- Static network setup
- Reverse DNS (PTR)
- Networking terms
- How DNS works
- Private networking
- Private link with WireGuard
- Failover and floating IPs
- Firewall rules explained
- Load balancing explained
- HAProxy load balancer
- TLS certificates explained
- SSH hardening
- Firewall setup
- Point a domain