Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
share|improve this question
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 Aug 6 '13 at 7:10
    
What show the output of "route"? You can set different routes –  kockiren Aug 6 '13 at 7:10
    
What VPN software do you use? Does it create its own virtual network adapter? –  Marcel Waldvogel Aug 6 '13 at 7:16
    
Yes I am connected to the internet with my home connection. The router IP (gateway) is 192.168.1.1 –  user2024475 Aug 6 '13 at 7:17
    
I use Ubuntu interface (gnome) to config the VPN. No use a software. –  user2024475 Aug 6 '13 at 7:22

1 Answer 1

up vote 0 down vote accepted

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
share|improve this answer
    
which is the order in which the routes are execute in case of overlapping routes? –  user2024475 Aug 6 '13 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 Aug 6 '13 at 12:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.