Technology

IP Masquerading (NAT in Red Hat)

In my lab I have a server that is dual homed.  It is connected to the outside network on one interface (br0) and the internal network (br1) is connected to the rest of my VM cluster. I want the VMs to be able to get outside.  So the way I did that (on RedHat) was to create a few IP table rules.  I've been doing this for 10+ years now, but keep forgetting syntax. So here it is:
# iptables -A FORWARD -i br1 -j ACCEPT
# iptables -t nat -A POSTROUTING -o br0 -j MASQUERADE
Then, of course, you have do enable forwarding in the /etc/sysctrl.conf
net.ipv4.ip_forward = 1
Finally, run
sysctl -p
for those changes to take effect.