A random tale of debugging strange behavior

So, here’s what I’ve been doing for the past few hours. Thought maybe someone will find it useful.

I’ve got a few VMs set up on Proxmox, and gave each of them 3 network cards. All 3 from the same hardware network card. That was the mistake, I eventually found out.

So, each VM has eth0, eth1 and eth2.

With respective network ranges of, and

These VMs also had some firewall rules applied to them. For instance, INPUT rules that say: only accept traffic for this list of ports if it comes via over eth0.

And some software that forms a cluster by communicating over this range was reporting errors.

Took me way too long to try something like this:

sudo iptables -A INPUT -j LOG --log-prefix "Dropped Packet: " --log-level 4

Checking /var/log/syslog, I found that the packets were coming in… but on eth2. They were properly marked as having come from, with source and destination port… but were being picked up by eth2 instead of eth0.

So, lucky me, the machine actually did have a second physical network card. I stopped the VMs, removed the last 2 network cards and added them back on this 2nd card, leaving on the first card.

Restarting after this, everything connected as expected.

From what I can tell with my limited knowledge, this behavior is down to the 3 ifaces actually being the same physical card and there not being proper separation being applied.

Or maybe I’m wrong? I’m too tired to keep looking at this point. Any insights welcome, of course.