Share VPN Internet Connection
I have a linux Box (Debian) conected to internet as VPN client. I have extra one ethernet card (eth0) available on the Box which I will like to connect with my LAN hub for my other computers (both Windows and Linux OS) to also have have Internet access.
How can I shared the Box (VPN Internet connection) with the eth0 and how do I enable the Box DHCP to act as Router for all Computers on the LAN?
Please I need HELP here!
Well, do you know how yor interface for VPN is identified?
Just run ifconfig to check that. Let us say that it is tun0
i) Ability packet forwarding:
echo 1 > /proc/sys/net/ipv4/ip_forward
ii) Masquerade every machine on your network
iptable -A POSTROUTING -t nat -s x.x.x.x/24 -o tun0 -j MASQUERADE
iii) Copy the DNS servers from
and place for everyone on your LAN, if they are static otherwise I advice you to configure a only caching DNS server.
Remember, steps i) and ii) must be executed for each reboot. So, for now place those commands on /etc/rc.local.
Good Luck and Hope this will help
|All times are GMT -5. The time now is 11:55 PM.|