akash_rawal

@akash_rawal@lemmy.world

This profile is from a federated server and may be incomplete. Browse more on the original instance.

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....

akash_rawal,
akash_rawal,

How I lost a Postgres database:

  1. Installed Postgres container without configuring a volume
  2. Made a mental note that I need to configure a volume
  3. After a few days of usage, restarted the container to configure the volume
  4. Acceptance
akash_rawal,

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.)

And I wasn’t even using Docker.

akash_rawal, (edited )

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 &lt;&lt;&lt; "Message"
</span><span style="color:#323232;"># # Worked
</span><span style="color:#323232;"># socat - udp-sendto:192.168.0.255:8000,broadcast &lt;&lt;&lt; "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 &lt;&lt;&lt; "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 &lt;&lt;&lt; "Message"
</span><span style="color:#323232;"># # Worked
</span>
akash_rawal,

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.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • fightinggames
  • All magazines