To make a linux box act as the gateway for a NAT (in this example, using IPTables, run:

# Enables forwarding. Same effect with 'sysctl net.ipv4.ip_forward=1'
echo 1 > /proc/sys/net/ipv4/ip_forward

# Define $INSIDE as the interface going into the NAT
# Define $OUTSIDE as the interface going to the internet

# Route traffic destined to to $INSIDE
route add -net dev $INSIDE

# Masquerade traffic going to $OUTSIDE

# Forward traffic coming from $INSIDE
iptables -A FORWARD -i $INSIDE -j ACCEPT

Add additional tweaks as required to the firewall. You will probably want to run iptables-save to make the changes persistent.