Guest User!

You are not Sophos Staff.

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

site-to-site vpn with load balancing vpn over multiple tunnels?

Hi everyone,

Beware! This is a LONG post...

at first i want to give you a (relatively) short description of what I have:
3 Sites:

 - Site A (Main Site) = 10.100.0.0/14, 192.168.10.0/24 
        Sophos Virtual UTM (VMWare)
        with 
        1 x 34MBit/34Mbit fibre connection 
             two interfaces WITHOUT default gw (A1: 217.a.b.c/29 and A2: 217.a.b.c+1/29)
        1 x 150Mbit/10Mbit asynchronous cable internet (130.x.y.z/29)
             one interface WITH default gw (130.x.y.z-1)
 
- Site B = 10.104.0.0/14
        2 x Sophos UTM 120 (High Availability)
        with
        1 x 10MBit synchronous connection (B1: 217.d.e.f/29)
             one interface WITHOUT default gw
        1 x 10MBit synchronous connection (B2: 217.g.h.i/29)
             one interface WITHOUT default gw
        1 x 150Mbit/10Mbit asynchronous cable internet (95.x.y.z/29)
             one interface WITH default gw
 
 - Site C = 10.108.0.0/14 with ONE 10MBit synchronous connection
        1 x Sophos UTM 120
        with
        1 x 5MBit synchronous connection (C: 217.j.k.l/29)
             one interface WITHOUT default gw
        1 x 16Mbit/1Mbit asynchronous DSL (217.m.n.o)

and what I want to achieve:
- connection from A to C with A's cable connection being the fallback line

- connection from A to B with TWO tunnels:
      - 217.a.b.c (A1) to 217.d.e.f (B1)
      - 217.a.b.c+1 (A2) to 217.g.h.i (B2)
and a way to load BALANCE THE VPN-TRAFFIC on these tunnels. optionally/ideally A's cable connection will be used in this scenario as fallback line - but this is not the primary focus.
additionally I do NOT want to use A's fibre connection (217.a.b.c/29) for normal internet traffic; so no default route on these interfaces.

And now for the fun part. 
What I have done so far:
Site A:

 - created interface group IntGA with interfaces A1 and A2 on site A's firewall
 - created static routes on site A's firewall:
   217.d.e.f/29 via 217.a.b.c-1 on interface A1 (route to site B public IPs 1)
   217.g.h.i/29 via 217.a.b.c-1 on interface A2 (route to site B public IPs 2)
   217.j.k.l/29 via 217.a.b.c-1 on interface A1 (route to site C public IPs)
   10.104.0.0/14 interface route via interface group IntGA (A1,A2)
   10.108.0.0/14 interface route via interface A1
 - created ipsec tunnels:
   defined two ipsec gateways (217.d.e.f (B-IP1) and 217.g.h.i (B-IP2)) both set to initiate connection (to site B)
   defined one ipsec gateway (217.j.k.l (C-IP)) set to initiate connection (to site C)
   defined two ipsec connections for B: 
   1 x via interface A1 to B-IP1 and 
   1 x via interface A2 to B-IP2
   defined one ipsec connection for C via interface A1 to C-IP
   all ipsec connections are set to bind tunnel to local interface
 - defined a multipath rule (any ipv4) (protocol any) (destination 10.104.0.0/14) balance (by connection) (to IntGA)

Site B:
 - create interface group IntGB with interfaces B1 and B2 
 - create static routes on site B's firewall:
   217.a.b.c/32 via 217.d.e.f-1 on interface B1 (route to site A's first IP on 34MBit line)
   217.a.b.c+1/32 via 217.g.h.i-1 on interface B2 (route to site A's second IP on 34MBit line)
   10.100.0.0/14 interface route via interface group IntGB (B1,B2)
 - create ipsec tunnels:
   defined two ipsec gateways (217.a.b.c (A1) and 217.a.b.c+1 (A2)) both set to initiate connection (to site A)
   defined two ipsec connections for a:
   1 x via interface B1 to A1 and
   1 x via interface B2 to A2
   all ipsec connections are set to bind tunnel to local interface
 - defined a multipath rule (any ipv4) (protocol any) (destination 10.100.0.0/14) balance (by connection) (to IntGB)
 
Site C:
 - create static route on site C's firewall:
   217.a.b.c/29 via 217.j.k.l-1 on interface C (route to A's public IPs on 34MBit line)
   10.100.0.0/14 interface route via interface C
 - create ipsec tunnels:
   defined one gateway (217.a.b.c (A1)) set to initiate connection (to site A)
   defined one ipsec connection via Interface C to A1
   ipsec connection set to bind tunnel to local interface

Result so far:
- all ipsec tunnels are UP and using correct interfaces/IPs
- ping is working from A to C, A to B and the other way round
  BUT
the icmp traffic is NOT being distributed among the two tunnels between A and B.

Always the first tunnel (Interface A1 to B1) is being used; there is no traffic shown on the other interface. Disabling the used tunnel does not work either; once I do that, no traffic is flowing anymore between A and B. I can force the usage of the second tunnel by a) changing the order of the interfaces within the interface group on both sites or b) explicitly use the second interface instead of the interface group in the static interface route on both sites.
I do not have default gateways on any interface used for an ipsec tunnel. Everything is done using static routes. That is the option "Uplink balancing" is disabled.
  
Can anyone confirm a setup like this is even possible? It should be a "piece of cake" but maybe the load balancing mechanism requires the interfaces to be part of the "Uplink Interfaces" group - which I cannot use as there should be no gateway on the interfaces used for VPN. I don't want "ordinary" internet traffic slowing the VPNs down...

Maybe I'm just thinking too complicated ... [:S]

Can anyone help me with this rather advanced setup?


This thread was automatically locked due to age.
  • Hi, Fred, and welcome to the User BB!

    You cannot do uplink balancing over two VPN Connections.  The best you can do is failover.  CORRECTION: It is possible to do balancing and FredJ was out ahead of me.  I didn't realize that "Bind Tunnel to local Interface" had been added, and I didn't read his description closely enough.  See below.

    When you define a VPN, there are automatic Static Routes created by WebAdmin that have priority over your manual routes.

    Can you now simplify your question and explain why you want to do this - your motivation?

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Hi Bob!
    Thanks for your answer.

    We need a bandwidth of about 12-13 MBit on the VPN-Connection between site A and site B for multiple tcp connections from clients at B to a bunch of servers at A. Unfortunately the best single connection available at site B is 10MBit. So we thought it might be possible to divide the traffic among the two VPN connections. 
    I know that something like that is possible with some routers; though it only works well with equal bandwidth links.

    So the best I could think of was to load balance based on individual ip connection.

    If there is absolutely no chance then I might try to create artificial subnets and create the VPN rules accordingly. That is divide 10.104.0.0/14 into 2 subnets and route one subnet over VPN A1-B1 and the other over A2-B2. I'd then only have to make sure client ip addresses in site B are uniformly distributed among the two subnets.

    Or can you think of a better solution with the given hardware?
  • Are there any "gains" that can be made via compression on your site-to-site communications?

    Is the ~13mbit/s desired bidirectional or does it favor a particular direction?
  • As the traffic will be remote desktop protocol with enabled compression we won't gain anything by compressing on the network layer. As for favored direction: we expect WAY more traffic to go from A to B than the other way round.
    But RDP sessions are a bit critical when it comes to response times and "jitter". So we'd like to have that traffic on a "high quality" line instead of the cable connection (which failed today for two hours *sigh*). As we are going to have about 30 people working on the terminal servers over the vpn connection, it is critical that line failures tend to 0.
  • BAlfson, could you tell me - well point in the right direction - how to at least configure failover? That way we would at least have a secondary line available in case the first goes down. We MIGHT get along with 8-10 MBit as there are only peaks going up to 13 MBit once or twice a day and we have no clue as to why. Might just be several people logging on at the same time or something like that.

    I currently think to implement failover like this:
    on site A:
    route to B's public 10MBit IPs via 34MBit metric 1
    route to B's public cable IPs via 34MBit metric 1
    what would happen if the 34MBit failed? would traffic be routed via A's cable connection as that has the default gateway set?

    and on B:
    route to A's 34MBit IP-range via B's 10MBit (line 1) with metric 1
    route to A's cable IP-range via B's 10MBit (line 1) with metric 1
    route to A's 34MBit IP-range via B's 10MBit (line 2) with metric 2
    route to A's cable IP-range via B's 10MBit (line 2) with metric 2
    so if line 1 fails, routing would take line 2 and if that fails too it would take default gw ?

    Then 
    define Availability Group on A containing (in sequence) B1, B2, B cable.
    define Availability Group on B containing (in sequence) A 34Mbit, A cable.
    define Availability Group on C containing (in sequence) A 34Mbit, A cable.

    on each site use that availability group within the ipsec gateway definition.

    Did I get it at least partially right?
  • I've been gone/busy for awhile, and just saw this again.  The automatic routes created by WebAdmin for a VPN will take precedence over the manually-created ones.

    In order to have auto-failover where Site A and Site B both have two WAN connections:

    Site A

    The 'Gateway' for Site B is an Availability Group with IPs of Site B in order WANB1, WANB2
    IPsec Connection to Site B has 'Local interface: Uplink Interfaces'
    Uplink Balancing enabled with IPsec traffic to Site B Availability Group bound to WANA1


    Site B

    The 'Gateway' for Site A is an Availability Group with IPs of Site A in order WANA1, WANA2
    IPsec Connection to Site A has 'Local interface: Uplink Interfaces'
    Uplink Balancing enabled with IPsec traffic to Site A Availability Group bound to WANB1


    All of the routing takes care of itself.  Do you have what you wanted?

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • I didn't see that FredJ's IPsec Connections all had "Bind Tunnel to local Interface" selected, nor that that option had been added (sometimes, you only see what you know is there).  I should have asked for diagrams and pics of his settings.

    This should be possible.  I would start with redundant tunnels A=B, B=C & C=A.  Then I would work on A=B-via-C,  B=C-via-A and C=A-via-B.  I'd have to see a diagram though, and I would make one for myself if I were getting paid to do this.

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA