Internet share via lan port
Hi
One of my laptop(Redhat) have internet connection through wireless lan (wlan1), it have ethernet port eth0
How can i share internet via ethernet eth0
Gateway Ip= 10.0.0.1/255.255.255.0 (modem-dhcp)
PC1--> ip --> 10.0.0.2/255.255.255.0 ( internet pc)
pc2 --> ip --> 10.0.0.4/255.255.255.0,gateway :10.0.0.2
I did some steps on pc1
----------------
enabled Ip forward ( sysctrl -w ne.ipv4_forward= 1)
# iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
# iptables -A FORWARD -i wlan0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
# iptables -A FORWARD -i eth0 -o wlan0 -j ACCEPT
But no internet on pc2
|