Internet Sharing in Linux
Internet Sharing in Linux
Run as root
sysctl -w net.ipv4.ip_forward=1
net.ipv4.ip_forward = 1
iptables
Run command as root
Configuration
The configuration should be like this
Router
Connected to router
IP : 192.168.1.10
Netmask : 255.255.255.0
Gateway : 192.168.1.1 (IP of the router)
Second System
LAN Card connected to the first system
IP : 192.168.0.30
Netmask : 255.255.255.0
Gateway : 192.168.0.20 (IP of the second Card in the first system)
Status
Some results of various commands are shown here. Check to see if it matches the result
on your system.