Find the answer to your Linux question:
Results 1 to 6 of 6
Hello! I'm facing the following situation with my linux gateway: I've 2 isp, one has static ip (lan) and the other uses a HAG witch release dhcp in lan too. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2002
    Posts
    4

    Routing to same net but with different gateways


    Hello!
    I'm facing the following situation with my linux gateway:

    I've 2 isp, one has static ip (lan) and the other uses a HAG witch release dhcp in lan too.
    I need only voip calls to use one isp and all other internet traffic goes to the second.
    I've managed to have this working.

    I also have a vpn managed by a router cisco.

    My gw has the following routing table:


    10.82.20.13 0.0.0.0 255.255.255.255 UH 0 0 0 tun1
    10.82.20.0 10.82.10.3 255.255.255.0 UG 0 0 0 eth0
    10.82.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    36.232.48.0 0.0.0.0 255.255.240.0 U 0 0 0 eth1
    169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
    0.0.0.0 36.232.48.1 0.0.0.0 UG 0 0 0 eth1
    [root@gwlentini root]#


    As you can see the vpn uses the following line: 10.82.20.0 10.82.10.3 255.255.255.0 UG 0 0 0 eth0

    I now set up another vpn using amvpn (ssl tunnel) and my target is to have host 10.82.20.13 to go through the internet line 1 using my amvpn.

    I set up port natting correctly on both ends of the vpn as it works fine, the problemi is that rule

    10.82.20.0 10.82.10.3 255.255.255.0 UG 0 0 0 eth0

    overrides rule
    10.82.20.13 0.0.0.0 255.255.255.255 UH 0 0 0 tun1

    the solution i found would be to change ip address to host 10.82.20.13 and connect it directly to the gw on the other end of vpn, but this is not possible.


    Any help is appreciated.

  2. #2
    Just Joined!
    Join Date
    Jul 2002
    Posts
    4
    If my post is not clear, please let me know it so i'll try to describe the issue in a better way.

    thank you.

  3. #3
    Just Joined!
    Join Date
    Apr 2009
    Posts
    9
    I'm not sure how linux handles this - as both entries would match the .13 address. I would suggest you try to assign them different metric, make the .13 specific entry higher priority. Unfortunately, I don't have a testbed to try it out myself.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jul 2002
    Posts
    4
    Hello Spider and thank you so much for repling.
    If i only had a clue on how to give higher priority to it...I would have done it, but unfortunately my competences are not that advanced.

    My only solution is to change ip to this client, but that would open other related issues to it.


    I also thought i could map a different ip from gw to gw and have them reassign the right ip at the end...but same issue, no clue on how to do it.

  6. #5
    Just Joined!
    Join Date
    Apr 2009
    Posts
    9
    Do a "man 8 route", follow the format and specify metric with add. I'm using fedora and haven't found a way to specify that in GUI.

    If that works, next step will be to make it persistent. One way is to add it to one of the route files - I have to look up if the keyword is METRIC, won't be surprised if it is.

  7. #6
    Just Joined!
    Join Date
    Jul 2002
    Posts
    4
    Hello Spider,
    I don't use any visual interfaces, just shell.
    I will read all route man pages and try to do it that way.
    In order to make it persistant i can either add it in /etc/rc.local or have rc.local call a script that i can make in order to set all thiese values.

    I will get back as soon as i get a clue on how to fix this issue.

    thank you very much for helping me!

Posting Permissions

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