Find the answer to your Linux question:
Results 1 to 5 of 5
Hi, well I am running a VPN (Juniper Networks client) and an ifconfig shows me that its opening a tunnel and also adding routing instructions (I think). Anyway the problem ...
  1. #1
    Just Joined!
    Join Date
    Jul 2010
    Posts
    14

    Routing problem (Tunneling)

    Hi, well I am running a VPN (Juniper Networks client) and an ifconfig shows me that its opening a tunnel and also adding routing instructions (I think). Anyway the problem is that when I'm connected to the VPN, I lose route to all my local machines and this is getting annoying when I want to use ssh.

    Does anyone know how to not route a certain range of IP's through the VPN?

    Thanks.

  2. #2
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,096
    Depends on you network(s).

    Something along the lines
    Code:
    route add -net <YOUR_NET> netmask <YOUR_NETMASK> dev <YOUR_DEV>
    and/or
    route add -net <YOUR_NET> netmask <YOUR_NETMASK> gw <YOUR_GATEWAY
    Use route after the vpn is established.

    This is jsut a quick hack, maybe that vpn client takes configuration (no idea)
    or you can at least wrap the vpn client call + the routes in a script.
    You must always face the curtain with a bow.

  3. #3
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    Location
    Virginia
    Posts
    622
    What you want is called "split tunneling" in VPN jargon. You may be able to configure it in the Juniper client, but you may find that the VPN server you're connecting to force pushes a "no split tunnel policy". Many corporate security policies require that they be configured that way to avoid the possibility of the client being used to establish a backdoor route.

  4. #4
    Just Joined!
    Join Date
    Jul 2010
    Posts
    14
    Quote Originally Posted by Irithori View Post
    Depends on you network(s).

    Something along the lines
    Code:
    route add -net <YOUR_NET> netmask <YOUR_NETMASK> dev <YOUR_DEV>
    and/or
    route add -net <YOUR_NET> netmask <YOUR_NETMASK> gw <YOUR_GATEWAY
    Use route after the vpn is established.

    This is jsut a quick hack, maybe that vpn client takes configuration (no idea)
    or you can at least wrap the vpn client call + the routes in a script.
    Thanks, it worked. Just another query, if I don't want to route an entire network, just one box with an ip x.x.x.x, should I just give

    route add -host x.x.x.x netmask X.X.X.X dev <device>

    ?

  5. #5
    Just Joined!
    Join Date
    Jul 2010
    Posts
    14
    Right, that was stupid.
    I figured it out.

    Thanks both of you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •