Convert a GNU/Linux PC in a router

You can connect with me on LinkedIn to discuss collaborations and work opportunities.

You can also follow me on Twitter, Bluesky and Mastodon.

For converting a simple computer with two interfaces (or more) in a router, it's necessary just to type two sentences in a console:

echo 1 > /proc/sys/net/ipv4/ip-forward

iptables -t nat -A POSTROUTING -o -j MASQUERADE

You can connect with me on LinkedIn to discuss collaborations and work opportunities.

You can also follow me on Twitter, Bluesky and Mastodon.