Simple Networking in Linux
insanity.industries
insanity.industries
wired: ifconfig [if] autoconf up
wireless: ifconfig [if] join [ssid] wpakey [pass] autoconf up
Consistent documentation existing in man ifconfig. The sad thing is that Linux used to be designed not evolved.
Knowing the reality, looking at the domain name, given the title, and that it starts off:
> It is time to revisit of the simple wifi setup as much has changed [in a year]
I am led to believe this is satire.
Looking at their other posts, some very serious not funny at all kind of satire.
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.
I have been burned by systemd-resolved. It seems like a black box that does silent automagical stuff in a non transparent way. I am keen to hear what the advantages are though. (barring stats and DNSSEC.)
_personally_ I am still a fan of /etc/network/interfaces and or whatever redhat style machines do.
I have also used network manager, which is sorta ok, but when stuff starts failing it seems to suck donkeyballs. (it also crashes when you start doing auth)
I was gonna ask how to check this stuff out, but then I found it: `resolvectl`. I think it may have previously been the command `systemd-resolve`.
`resolvectl statistics` will spit out those statistics and `resolvectl flush-caches` could help with some DNS issues by making resolved forget everything. There's plenty of other commands in there too.