vik-y
7/21/2015 - 6:30 AM

A code for forwarding

A code for forwarding

modprobe iptable_nat
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE #Forward on this interface 
iptables -A FORWARD -i wlan0 -j ACCEPT #Tells to accept all connections coming on wlan0 

# Works completely fine - Need to test it on OpenVPN 
# Here the interface which has internet is eth0 
# Need to understand POSTROUTING nad MASQUERADE