This won’t work with real VPN connections, and you may have problems with other oddities like a Play Station 3 or Xbox, but perhaps someone else knows a way around that too?!
# echo “1″ >> /proc/sys/net/ipv4/ip_foward
# iptables -F
# iptables -t nat -F
# iptables -t mangle -F
# service iptables save
# service iptables restart
This is the interface that’s connected to the router (192.168.1.1)
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
# ifconfig eth0 192.168.1.2 netmask 255.255.255.0 default gw 192.168.1.1
This is the interface that will connect to a switch to create the LAN (or just directly to another machine via crossover cable)
# ifconfig eth1 192.168.100.1 netmask 255.255.255.0 default gw 192.168.1.1
# service iptables save
# service iptables restart
# iptables -t nat -L POSTROUTING
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all — anywhere anywhere

Try dhcp. If your sharing host is connected to a router handing out dhcp addresses, you’ll get /etc/resolv.conf set up for you too.
# ifup eth0 && dhclient eth0
Manually:
# ifconfig eth0 192.168.100.2 netmask 255.255.255.0 default gw 192.168.100.1
# ssh 192.168.100.1 hostname
# ping blog.rootninja.com
That’s it…. This should work step-for-step on CentOS, Fedora, and any Redhat-like distribution. The basic idea will work on any Linux host with iptables.