Wednesday, April 9, 2008

Set up gateway on a Linux system

on the pc that will be the gateway:

iptables -F --to flush(drop) the firewall

ifconfig eth1(external interface) ip) netmask up

ifconfig eth4(internal interface) ip) netmask up

echo 1 > /proc/sys/net/ipv4/ip_forward

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

An automated script was written a tutorial is posted HERE.

No comments: