4 ms·
Oh, does networking ever get fun. Debugging udev sounds like easy mode. At least it's userspace and has logs. I've been beating my head against this one problem
by dale_glass 3y ago
Oh, does networking ever get fun. Debugging udev sounds like easy mode. At least it's userspace and has logs. I've been beating my head against this one problem for days with no progress whatsoever.
Scenario:
Host: Laptop (192.168.0.2)
Outer VM: Ubuntu (192.168.122.254, assigned by libvirt)
Inner VM: Ubuntu (10.0.0.2)
Inner VM is a normal Ubuntu install, nothing odd about it.
Outer VM is setup to MASQUERADE Inner's IP address. It's all straightforward. There's only one exit network interface, and iptables is set up perfectly normally. Copy/pasted from the docs even just to be sure.
Checking stats shows that the NAT table is not actually being hit. Inner's packets get forwarded to Host with the IP address un-NATed. Stuff obviously doesn't work.
And how exactly do you debug this? How do you ask the kernel, "hey, why do you think this particular packet has no need to go through the NAT table?"
In general for networking kernel-side what you get is that if you're lucky you get an error number which doesn't even come close to explaining what the actual problem is. If you're not, stuff just fails to work with no explanation whatsoever. Yeah, you can add log rules, but it's kind of a problem when the table you think should be consulted just isn't, at all.
Well, I guess at least there's source code. Hope it doesn't come to that.