LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 05-29-2009, 12:19 AM   #1
davidolaj
LQ Newbie
 
Registered: Nov 2006
Posts: 8

Rep: Reputation: 0
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!

Last edited by davidolaj; 05-29-2009 at 12:24 AM.
 
Old 05-29-2009, 01:33 AM   #2
orvaquim
LQ Newbie
 
Registered: Nov 2004
Posts: 17

Rep: Reputation: 0
Well, do you know how yor interface for VPN is identified?

Just run ifconfig to check that. Let us say that it is tun0

Follow this:
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
cat /etc/resolv.conf

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
Caveman
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with the VPN internet connection Deadw Slackware 1 04-01-2008 05:03 PM
Can not share internet connection bradshoults Linux - Networking 3 08-15-2007 11:10 PM
VPN connection with my internet provider kruvalig Fedora 5 08-01-2007 02:08 AM
making VPN internet connection mohtasham1983 Linux - Newbie 3 09-27-2005 03:13 PM
Share VPN connection eplegutt Linux - Networking 0 02-18-2004 06:27 PM


All times are GMT -5. The time now is 12:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration