This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Advanced Routing over an IPSec Connection

What would be the best way to reach (network C) from (network A)?  What routes to i need to realize to get it to work?

Sorry for the cheap artwork  

(network A)  ASL  IPSec Connection  ASL  (network B)  Router  (network C) 

The ASL in (network A) knows nothing about where (network C) is.
The ASL in (network B) knows that he can reach (network C)  over the router in (network B).
The Router in (network B) knows that he can reach (network A) over the ASL in (network B).  

my thought is to add a static route on the ASL in (network A) for (network C) to the Router in (network B).

A major point is that NO NAT can take place between (network A)  and (network C) 

Current VPN Route:

217.5.98.15 dev ppp0  scope link 
217.5.98.15 dev ipsec0  proto kernel  scope link  src (dynamic IP) 
(network A) dev eth0  scope link 
(network B) via 217.5.98.15 dev ipsec0
 
Somehow I think something is missing like:
(network C) via Router (network B) via 217.5.98.15 dev ipsec0

err?? I am making it more complicated than it is eh??

Thx.

  


This thread was automatically locked due to age.
Parents
  • Hi Tmor,

    I think you could try your suggested route. It should work.
    When not one try these one:

    1.
    Astaro (network a) static route for network c pointing to Astaro in network b.

    2. On the astaro in network b insert a static route for network c.

    thats all.

    Best regards

    Udo Seiler   
  • all traffic is being sent over the internet and NOT over the VPN.

    it appears the IPSec Routes dont care anything about Static Routes.

    setting a Static Route on ASL (network A) to Router (network B) didnt work.
    setting a Static Route on ASL (network A) to ASL (network B) which knows that to reach (network C) it must go through the router (network B) didnt work either.

    all traffic for (network C) is being routed over the internet from (network A)

    it might be important to note that (network C) is a class B network 53.xxx.xxx.xxx/16 that is not reachable from the internet.

    Traceroute from ASL (network A)

    traceroute to (network C) (53.xx.xx.xxx), 30 hops max, 40 byte packets
     1  217.5.98.15 (217.5.98.15)  73 ms  55 ms  58 ms
     2  217.237.152.114 (217.237.152.114)  53 ms  74 ms  53 ms
     3  S-gw12.S.net.dtag.de (62.154.22.162)  58 ms  93 ms  80 ms
     4  53.122.84.5 (53.122.84.5)  59 ms  59 ms  59 ms
     5  *     *    
  • Tmor,

    not sure about the answer but as far as I understood VPN you'd need for each
    network you want to reach a separate tunnel. 

    Greetings
    cyclops
      
  • Hi Tmor,

    I hav'nt used Static routes on my ASL so far...
    No more serios idea.
    perhaps you call the astaro support?

    I'll also interested in the solution to this problem

    Best Regards

    Udo Seiler
      
  • The ONLY way to reach different subnets over an ipsec vpn, is to create tunnels for each network you want to reach. I know because I just did this for a client, and had to create 8 tunnels. 
  • Thx for the info Red, but...

    what u are suggesting is that i build a Tunnel in a Tunnel.  The Router in (network B) is only reachable from (network B).

    ** edited, was using NAT on the X509 ** opps sorry [:(]

    It seems to me that if I set the Policy Routes correctly it should work.

    something like: asl:/ #ip route add 53.x.x.x/16 via 217.5.98.15 dev ipsec0

    the 217.5.98.15 is the virtual interface that is setup by the ASL for the ppp0 interface.

    and on the otherside I would need a rule that more or less says everything that comes over the ipsec0 or any other source for that matter for 53.x.x.x send it to the router in (network B).

     [:S] 
     
  • Hi Tmor,
    I've to agree with RED.
    This behaviour I had also with the PIX Firewall from Cisco.

    Site A (one IP-Range)Site B (Two IP-Ranges, directly connected to the Firewall at Site B)
    There I had to configure two VPN-Tunnel (one for each IP-Range).
    I think it is an Impact in the Gateway VPN-Tunnel definition.
    I would say, REDs Suggestion is the only way.

    Best Regards

    Udo Seiler  
  • Multiple tunnels is the way to do it.  It isn't a tunnel within a tunnel as each one is independant and can run without the other.  The additional overhead beyond the first tunnel is trivial.
    The other way if the subnetting allows it is to specify a subnet range that includes all the desired ranges.
    192.168.0.0/16 would include all 192.168.x.x IPs.  Doesn't have to be exactly the subnet in question.  This is how you would create a wheel and spoke VPN.  Multiple VPNs is easier in your case though.
      
  • nope didnt work guys.

    ASL (network A) VPN Connections and Routes:

    3          10.49.1.0/24:0   -> 10.49.2.0/24:0    => tun0x11a8@194.172.xxx.xxx:0
    0          10.49.1.0/24:0   -> 53.xxx.0.0/16:0    => tun0x11aa@194.172.xxx.xxx:0

    217.5.98.15 dev ppp0  scope link 
    217.5.98.15 dev ipsec0  proto kernel  scope link  src 217.86.xxx.xxx 
    10.49.1.0/24 dev eth0  scope link 
    10.49.2.0/24 via 217.5.98.15 dev ipsec0 
    53.xxx.0.0/16 via 217.5.98.15 dev ipsec0 
    127.0.0.0/8 dev lo  scope link 
    default via 217.5.98.15 dev ppp0 

    ASL (network B) VPN Connections and Routes:

    3          10.49.2.0/24:0    -> 10.49.1.0/24:0   => tun0x1258@217.86.xxx.xxx:0
    0          53.xxx.0.0/16:0    -> 10.49.1.0/24:0   => tun0x125a@217.86.xxx.xxx:0

    10.49.2.1 dev eth0  scope link  src 10.49.2.1 
    194.172.xxx.0/24 dev eth1  scope link 
    194.172.xxx.0/24 dev ipsec0  proto kernel  scope link  src 194.172.xxx.xxx 
    10.49.1.0/24 via 194.172.xxx.xxx dev ipsec0 
    10.49.2.0/24 dev eth0  scope link 
    53.xxx.0.0/16 via 10.49.2.254 dev eth0 
    10.0.0.0/8 via 10.49.2.254 dev eth0 
    127.0.0.0/8 dev lo  scope link 
    default via 194.172.xxx.xxx dev eth1 

    anyone else?

        
Reply
  • nope didnt work guys.

    ASL (network A) VPN Connections and Routes:

    3          10.49.1.0/24:0   -> 10.49.2.0/24:0    => tun0x11a8@194.172.xxx.xxx:0
    0          10.49.1.0/24:0   -> 53.xxx.0.0/16:0    => tun0x11aa@194.172.xxx.xxx:0

    217.5.98.15 dev ppp0  scope link 
    217.5.98.15 dev ipsec0  proto kernel  scope link  src 217.86.xxx.xxx 
    10.49.1.0/24 dev eth0  scope link 
    10.49.2.0/24 via 217.5.98.15 dev ipsec0 
    53.xxx.0.0/16 via 217.5.98.15 dev ipsec0 
    127.0.0.0/8 dev lo  scope link 
    default via 217.5.98.15 dev ppp0 

    ASL (network B) VPN Connections and Routes:

    3          10.49.2.0/24:0    -> 10.49.1.0/24:0   => tun0x1258@217.86.xxx.xxx:0
    0          53.xxx.0.0/16:0    -> 10.49.1.0/24:0   => tun0x125a@217.86.xxx.xxx:0

    10.49.2.1 dev eth0  scope link  src 10.49.2.1 
    194.172.xxx.0/24 dev eth1  scope link 
    194.172.xxx.0/24 dev ipsec0  proto kernel  scope link  src 194.172.xxx.xxx 
    10.49.1.0/24 via 194.172.xxx.xxx dev ipsec0 
    10.49.2.0/24 dev eth0  scope link 
    53.xxx.0.0/16 via 10.49.2.254 dev eth0 
    10.0.0.0/8 via 10.49.2.254 dev eth0 
    127.0.0.0/8 dev lo  scope link 
    default via 194.172.xxx.xxx dev eth1 

    anyone else?

        
Children
  • Hi Tmor,

    Can't follow your configuration...

    Did you have configured your Firewall B for NAT Traversal?
    Does your Router understand IPSEC?

    Here is my Suggestion:

    1.)
    One VPN-Tunnel configured on Firewall A and Firewall B

    2.)
    One VPN-Tunnel configured on Firewall A and Router to your additional subnet. Don't forget to configure your Firewall B to let this IPSEC packets pass through.

    HTH

    Udo Seiler  
  • It is not possible to build an IPSec connection to the router.

    the configuration is quite simple.  I have a segment behind my local network that i want to reach.

    ASL (10.1.1.1)  VPN  ASL (10.2.1.1)  (10.2.1.2) Router (53.1.0.0)

    The router knows that to reach 10.1.1.1 he has to go through 10.2.1.1
    The ASL (10.2.1.1) knows that to reach 53.1.0.0 he has to go through Router (10.2.1.2) - Ping works
    The ASL (10.1.1.1) knows nothing about how to reach 53.0.0.0

    so this is where all this started.

    there is now a VPN connection from ASL (10.1.1.1) to ASL (10.2.1.1) to reach the network (53.0.0.0), this is basically what everyone said above.
      
  • Hi Tmor,

    ok,  no VPN-Tunnel to the Router.

    At the moment you have two VPN-Tunnels configured?!

    One for tunneling traffic between 10.1.1.1 and 10.2.1.1
    And the Other tunnel for the traffic between 10.1.1.1 and the 53.1.0.0

    The endpoint for both tunnels is the Firewall at 10.2.1.1?

    You have to place an additional static route at Firewall 10.2.1.1 for the network 53.0.0.0 via your router.
    Why?

    With the second VPN-Tunnel your traffic from Network A to Network C could reach the Firewall (Network B) Now you have route this traffic to the Router for Network C

    HTH

    Udo Seiler   
  • Hi all,

    After extensive testing the solution has been found and implimented. However the exact cause still eludes me.

    The Network (with added upstream router on the right):

    (network A)  ASL  IPSec Connection to ASL  Router  ASL  (network B)  Router  (network C)

    Basically all were correct on the point of 2 tunnels between the ASLs to the 2 networks.  However NAT-T was activated on the ASL itself.  After deactivating the NAT-T everything appeared to work fine and the data did indeed travel though both tunnels.

    Because our upstream Router is inaccessable its not possible to check what he was doing. 

    I will admit that the concept/configuration is a bit strange. The Internet Router NATs a Class-B IP on the Router LAN Interface to another Class-B IP (same IP range) on/to the ASL External LAN Interface. An old concept from way back that should be deleted.

    thx. oliver