Networking Forums

Networking Forums > Computer Networking > Linux Networking > A PPTP VPN tunnel and a LAN

Reply
Thread Tools Display Modes

A PPTP VPN tunnel and a LAN

 
 
Clark Smith
Guest
Posts: n/a

 
      03-17-2011, 11:20 PM
My knowledge of networking is kind of rudimentary so please bear
with me.

I have a box A with a NIC eth0 connected to a hub in my local
192.168.0 network. The gateway for this network is another box B with IP
address 192.168.0.1. B has tow NICs and is directly connected to a modem/
router through the second NIC, and from there to the Internet. With this
setup A (and all the other boxes in the 192.168.0 network) can access the
Internet without any problems.

What I need to do is the following:

On A I have to create PPTP-based VPN tunnel to some remote box C
with IP address CCC. I have been able to do this, in the process creating
the ppp0 interface. The question is, How can I set things up in A so that
all of A's traffic is routed through the VPN tunnel on ppp0 by default,
whereas traffic for the 192.168.0 network is routed through the eth0
interface?

I tried to establish a default route through ppp0, but it would
seem that I first have to delete the existing default gateway. But when I
do this I immediately lose the VPN tunnel. I.e. I am trapped in a vicious
circle. Any pointers on how to break it would be most welcome.



 
Reply With Quote
 
 
 
 
Pascal Hambourg
Guest
Posts: n/a

 
      03-19-2011, 07:40 AM
Hello,

Clark Smith a écrit :
>
> On A I have to create PPTP-based VPN tunnel to some remote box C
> with IP address CCC. I have been able to do this, in the process creating
> the ppp0 interface. The question is, How can I set things up in A so that
> all of A's traffic is routed through the VPN tunnel on ppp0 by default,
> whereas traffic for the 192.168.0 network is routed through the eth0
> interface?
>
> I tried to establish a default route through ppp0, but it would
> seem that I first have to delete the existing default gateway. But when I
> do this I immediately lose the VPN tunnel.


In order to avoid this, a host route to address CCC must be created
before changing the default route.

route add -host CCC gw 192.168.0.1
or
ip route add CCC via 192.168.0.1

What software are you using to establish the PPTP tunnel ? IIRC,
pptp-linux does this automatically.
 
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VPN (PPtP) tunnel through D-Link DSA3200? Michael Network Routers 1 08-10-2006 09:06 PM
VPN (PPtP) tunnel through D-Link DSA3200? Michael Wireless Internet 5 08-03-2006 05:27 PM
Unable to create PPTP tunnel between two DCs Sune T. Tougaard Windows Networking 3 03-30-2006 08:44 AM
PPTP VPN tunnel from Linux PC to Windows network?? bosseb Linux Networking 4 01-19-2005 07:50 PM
network browsing through a pptp tunnel Covarde Anonimo Linux Networking 2 01-11-2004 12:48 PM



1 2 3 4 5 6 7 8 9 10 11