On a host node, one customer's VPS can put the whole business at risk. A VPS that scans the internet, sends spam or takes part in DDoS attacks generates abuse complaints, gets your IPs listed on blacklists such as Spamhaus, and can lead to the entire IP block being filtered. This guide shows how to find the responsible VPS quickly on a KVM host (Proxmox VE or any Linux bridge setup), recognise the type of abuse, stop it without affecting other customers, and prevent the most common cases.
Each KVM VPS has its own tap interface on the host (in Proxmox VE tap101i0 for VM 101). On a tap interface the counters are seen from the host, so rx is what the VPS sends out and tx is what it receives.
# Packets and bytes each VPS sent in the last 10 seconds (rx on the tap = outbound from the VPS)
for t in /sys/class/net/tap*; do n=$(basename $t); echo "$n $(cat $t/statistics/rx_packets) $(cat $t/statistics/rx_bytes)"; done > /tmp/a
sleep 10
for t in /sys/class/net/tap*; do n=$(basename $t); echo "$n $(cat $t/statistics/rx_packets) $(cat $t/statistics/rx_bytes)"; done > /tmp/b
join /tmp/a /tmp/b | awk '{printf "%-12s %8d pps %8.1f Mbps\n", $1, ($4-$2)/10, ($5-$3)*8/10/1000000}' | sort -k2 -nr | head
# Live view of who talks to whom on the bridge
iftop -i vmbr0 -nNP
A VPS sending tens of thousands of packets per second with modest Mbps is usually flooding or scanning; a steady stream of connections to port 25 is usually spam.
# Sample the traffic of one VPS (replace tap101i0)
tcpdump -ni tap101i0 -c 300 -w /root/evidence-vps101-$(date +%F-%H%M).pcap
tcpdump -nr /root/evidence-vps101-*.pcap | head -50
# Outgoing SMTP connections (spam)
tcpdump -ni tap101i0 'tcp dst port 25 and tcp[tcpflags] & tcp-syn != 0' -c 50
# Connections tracked for the VPS's IP (apt install conntrack)
conntrack -L -s 203.0.113.11 2>/dev/null | wc -l
conntrack -L -s 203.0.113.11 2>/dev/null | awk '{print $5}' | sort | uniq -c | sort -nr | head
| What you see | Likely cause |
|---|---|
| SYN packets to many different IPs on the same port (22, 23, 3389, 80) | Port scanning or brute-force, often from a compromised VPS |
| Many connections to port 25 on different mail servers | Spam, or a hacked mail script |
| Very high UDP or SYN packet rate towards one or a few destinations | DDoS participation |
| Steady connections to ports such as 3333 or 4444 | Cryptomining (usually allowed traffic-wise but may break your terms) |
Choose the mildest action that stops the problem, and escalate if it continues.
# Throttle the VPS immediately to about 8 Mbps (rate is in MB/s; keep the NIC's MAC from "qm config")
qm set 101 --net0 virtio=BC:24:11:AA:BB:CC,bridge=vmbr0,firewall=1,rate=1
# Block outbound SMTP for this VPS with the Proxmox firewall
cat >> /etc/pve/firewall/101.fw <<'EOF2'
[RULES]
OUT DROP -p tcp -dport 25 -log nolog
EOF2
# Pause the VPS (keeps memory state for investigation) or shut it down
qm suspend 101
qm shutdown 101
If the [RULES] section already exists in the file, add the rule there instead of appending a second section. Then tell the customer what you saw, with the evidence, and what they need to fix; a compromised VPS usually needs a reinstall and new passwords (see finding and removing malware on Linux).
Reply to the report promptly with the affected IP, the time you identified the source, the action taken (rate limited, port 25 blocked, VPS suspended) and that the customer has been contacted. Fast, clear replies are what keeps an IP block in good standing with upstream networks and blacklist operators.
# Datacenter-wide security group in /etc/pve/firewall/cluster.fw
[group no-smtp]
OUT DROP -p tcp -dport 25 -log nolog
# Use it in each VPS file, e.g. /etc/pve/firewall/101.fw
[RULES]
GROUP no-smtp
Scanning and brute-force attempts use very little bandwidth. Look at packet rates and connection counts (Step 1 and Step 2), not only Mbps.
Search your panel or the VM configurations: grep -r 203.0.113.11 /etc/pve/qemu-server/ /etc/pve/firewall/ shows which VM uses that IP.
Repeated or unanswered abuse gets IPs blacklisted and can force your upstream provider to filter the affected addresses to protect its network. Acting quickly with the steps above and replying to the report with what you did keeps the impact limited to the VPS involved.
Still stuck after following these steps? Open a support ticket and the IMIDC 24/7 technical team will help. Include the host server IP, the affected IP addresses, the abuse report reference and the output of the commands above so we can pinpoint the issue faster.