I’m working on a some materials for a class wherein I’ll be teaching some young, wide-eyed Windows nerds about Linux and we’re including a section we’re calling “foot guns”. Basically it’s ways you might shoot yourself in the foot while meddling with your newfound Linux powers....
Technically, containers always run in Linux. (Even on windows/OS X; on those platforms docker runs a lightweight Linux VM that then runs your containers.)
Just did some basic testing on broadcast addresses using socat, broadcast is not working at all with /32 addresses. With /24 addresses, broadcast only reaches nodes that share a subnet. Nodes that don’t share the subnet aren’t reachable by broadcast even when they’re reachable via unicast.
Edit1: Did more testing, it seems like broadcast traffic ignores routing tables.
On 192.168.0.2, I am running socat -u udp-recv:8000,reuseaddr - to print UDP messages.
Case 1: add 192.168.0.1/24
<span style="color:#323232;"># ip addr add 192.168.0.1/24 dev eth0
</span><span style="color:#323232;"># # Testing unicast
</span><span style="color:#323232;"># socat - udp-sendto:192.168.0.2:8000 <<< "Message"
</span><span style="color:#323232;"># # Worked
</span><span style="color:#323232;"># socat - udp-sendto:192.168.0.255:8000,broadcast <<< "Message"
</span><span style="color:#323232;"># # Worked
</span>
Case 2: Same as above but delete 192.168.0.0/24 route
<span style="color:#323232;"># ip addr add 192.168.0.1/24 dev eth0
</span><span style="color:#323232;"># ip route del 192.168.0.0/24 dev eth0
</span><span style="color:#323232;"># # Testing unicast
</span><span style="color:#323232;"># socat - udp-sendto:192.168.0.2:8000 <<< "Message"
</span><span style="color:#323232;">2024/02/13 22:00:23 socat[90844] E sendto(5, 0x5d3cdaa2b000, 8, 0, AF=2 192.168.0.2:8000, 16): Network is unreachable
</span><span style="color:#323232;"># # Testing broadcast
</span><span style="color:#323232;"># socat - udp-sendto:192.168.0.255:8000,broadcast <<< "Message"
</span><span style="color:#323232;"># # Worked
</span>
Here is a trick that has been tried and tested over the years: Install another distro, and use that to install Arch. This way, you can rely on an already working linux distro till your Arch install works the way you want.
What're some of the dumbest things you've done to yourself in Linux?
I’m working on a some materials for a class wherein I’ll be teaching some young, wide-eyed Windows nerds about Linux and we’re including a section we’re calling “foot guns”. Basically it’s ways you might shoot yourself in the foot while meddling with your newfound Linux powers....
How exactly does linux use prefix length assigned to network interface?
I was exploring direct links between machines, and basically failed to break something....
I'd like to get away from "arch bad for new users"
When I say arch I mean the arch distro and all of its offspring....