Apply source NAT for outbound traffic.
Section: Firewalling with nftables and iptables
Enable masquerading
bash
bash
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADEExplanation
Apply source NAT for outbound traffic.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Firewalling with nftables and iptables