| Setup Linux as an internet gateway |
|
|
|
| Monday, 12 February 2007 11:12 | |||
Needed:
DEVICE=eth1 ONBOOT=yes BOOTPROTO=none NETMASK=255.255.255.0 USERCTL=yes PEERDNS=no GATEWAY=eth0 TYPE=Ethernet IPADDR=192.168.100.1 # service network restart # rpm -q iptables # yum install iptables # lsmod | grep iptable_nat # modprobe iptable_nat # iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # service iptables save Activate ip forwarding # echo \"1\" > /proc/sys/net/ipv4/ip_forward Edit configfile so the change you made above is still active after a reboot # /etc/sysctl.conf net.ipv4.ip_forward = 1 Check the /etc/sysctl.conf file for errors # sysctl -p
|
Comments
RSS feed for comments to this post