




|
Tech Tips4
How to configure Linux machine as IP sharing?
Author: Ben|Date: 2007/06/07|Back to Tech Tips
We can use iptables to configure Linux machine as IP sharing:
Environment: Linux has two NICs: eth0 and eth1, which are connected to external network and internal network respectively. Internal network IP address: 192.168.1.0/24. Rule: #iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eth0 -j MASQUERADE #echo "1" > /proc/sys/net/ipv4/ip_forward |