Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Grant Taylor <gtaylor@riverviewtech.net>
To: Mail List - Netfilter <netfilter@vger.kernel.org>
Subject: Re: VPN (interface) access for and all traffic through from single user -- how to do it?
Date: Fri, 15 Aug 2008 11:28:02 -0500	[thread overview]
Message-ID: <48A5AE92.6090500@riverviewtech.net> (raw)
In-Reply-To: <200808151914.21997.janklodvan@gmail.com>

On 08/15/08 11:14, Jan Klod wrote:
> May I ask some commands?

*nod*

> Say, I have eth1 with address 192.168.2.34, router (and nameserver) 
> address 192.168.2.1 and I've connected to VPN through ppp0 with local 
> IP address 215.155.114.16 and remote IP address 215.155.115.254! 
> (VPN's gateway is 194.12.33.1 for connecting) (VPN or PPTP)

So your client is 192.168.2.34 and your (current) default gateway is 
192.168.2.1.  You have a VPN established from your client to 
215.155.115.254.  Your end of the inside of the VPN is 
194.12.33.<something> and the remote end of the inside of the VPN is 
194.12.33.1.  Is all of this correct?  (I'm going to presume yes with 
the commands below.)

route add -host 215.155.114.254 gw 192.168.2.1
route add default gw 194.12.33.1 metric 1
route del default gw 192.168.2.1
route add default gw 192.168.2.1 metric 2

This should do the following:
  - Add a route to your VPN target by way of (the IP of) your (current) 
default gateway.
  - Add a the remote end of the inside of the VPN as your new default 
gateway with a low metric.
  - Delete your old (local) default gateway.
  - Re-add your old (local) default gateway with a higher metric.

> At least, what are those command line entries, so I can browse 
> network through VPN?

If by "browse" you mean browse the web or use any other ""standard 
internet service, you should be good to go.  If by "browse" you mean 
"Browse 'My Network Places'" you may run in to other SMB / CIFS related 
networking issues (crossing subnets).

> Hope, I explained better...

I think so.  Does my response help?



Grant. . . .

  reply	other threads:[~2008-08-15 16:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-15  9:55 VPN (interface) access for and all traffic through from single user -- how to do it? Jan Klod
2008-08-15 15:29 ` Grant Taylor
2008-08-15 16:14   ` Jan Klod
2008-08-15 16:28     ` Grant Taylor [this message]
2008-08-15 16:19   ` Jan Klod
     [not found] ` <200808152212.59882.janklodvan@gmail.com>
     [not found]   ` <48A5F9E2.5080206@riverviewtech.net>
2008-08-16 20:47     ` Jan Klod
2008-08-17  4:30       ` Michael Alaimo
2008-08-17  5:01         ` Grant Taylor
2008-08-21 13:32           ` active interface? Jan Klod
2008-08-21 13:42             ` Jan Engelhardt
2008-08-21 14:27             ` Grant Taylor
2008-08-17  4:31       ` VPN (interface) access for and all traffic through from single user -- how to do it? Grant Taylor
2008-08-17 11:20         ` Jan Klod
2008-08-17 17:53           ` Grant Taylor
2008-08-22 20:40             ` Jan Klod

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48A5AE92.6090500@riverviewtech.net \
    --to=gtaylor@riverviewtech.net \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox