1

I have connected to a company's VPN connection, and this connection have not a internet connection.

I need to connect to internet. Can I define routes to connect the external traffic to the router home IP? It is possible?

I use GNU/Linux (Ubuntu).

I try to mark "Use this connection only for resources on its network" in VPN connection, but doesn't work the internal connections.

The Rangue IP in my local network: 192.168.1.2 (255.255.255.0) The Rangue of IP in my VPN connection (PPP): 192.168.2.58 (255.255.255.255)

Thanks you.

OUTPUT OF ROUTE COMMAND

Destino         Pasarela        Genmask         Indic Métric Ref    Uso Interfaz
default         *               0.0.0.0         U     0   0        0 ppp0
link-local      *               255.255.0.0     U     1000   0        0 eth0
192.168.1.0     *               255.255.255.0   U     1      0        0 eth0
192.168.2.1     *               255.255.255.255 UH    0      0        0 ppp0
10
  • 1
    Hmm, don't you have to be connected to the internet in the first place to make use of VPN? Otherwise, you clearly must be at your workplace I guess?
    – matcheek
    Commented Aug 6, 2013 at 7:10
  • What show the output of "route"? You can set different routes
    – kockiren
    Commented Aug 6, 2013 at 7:10
  • What VPN software do you use? Does it create its own virtual network adapter? Commented Aug 6, 2013 at 7:16
  • Yes I am connected to the internet with my home connection. The router IP (gateway) is 192.168.1.1 Commented Aug 6, 2013 at 7:17
  • I use Ubuntu interface (gnome) to config the VPN. No use a software. Commented Aug 6, 2013 at 7:22

1 Answer 1

1

If you connect to your VPN you can set on route to a special Host for example with this command:

route add -host 192.168.2.100 dev ppp0

With this command you can set the default Gateway to your local gateway:

route add default gw 192.168.1.1 dev eth0

If there is any other default gateway you can delete it first with:

route del default gw
2
  • which is the order in which the routes are execute in case of overlapping routes? Commented Aug 6, 2013 at 10:28
  • If you have overlapping routes you can set a route for a special network and the default gw match if no other route match.
    – kockiren
    Commented Aug 6, 2013 at 12:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .