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

Routing problem: Dual WAN and DHCP with large subnet mask

Hi,

I am using ASG220 with software 9.206-35. It has two WAN uplinks. WAN1 is connected to DSL with fixed IPs, WAN2 is connected to a cable modem and is getting its IP via DHCP with a 20 bit subnet mask. Both are in active load balancing with WAN1 being the first interface. There is a multipath rule directing e.g. http traffic through WAN2.

On WAN1 with the fixed IPs we have running several services, e.g. SSL-VPN.

Up to now I could connect via SSL-VPN from my home office (with cable modem from the same company as at work) without any problem.

Tonight cable modem company changed their network. Since then my official IP is from the same subnet (20 bit mask) as at work. This leads to traffic e.g. for SSL-VPN being routed through wrong WAN interface: When I try to connect to fixed ip on WAN1 then returning packets are routed through WAN2 because my external IP at home is from the same subnet as IP on WAN2. So SSL-VPN can not be established.

I tried to use multipath rules to get this work but cannot find how to achieve this in combination with possibly changing DHCP addresses.

What I would like to achieve is that all traffic to subnet addresses on WAN2 other than my own would be routed through WAN1. This - I believe - would solve my problem. I would also like to be able to use additional multipath rules to direct specific traffic to specific WAN interfaces.

Any hints?


This thread was automatically locked due to age.
  • No one having any hint? Is there missing information? Do I need to clearify things?

    One approach I see would be to add an external router via a transfer network. Router would have to use NAT. In this case UTM wouldn't know about subnet on WAN2 and would route the whole over WAN1. Can something like this be done on UTM itself?

    Really appreciate your help!
  • Hi KiP,

    This almost sounds similar to a common DNAT problem I see here on the forums. In that case, we have a client behind the UTM accessing a server on the same LAN as the client through the UTM's public IP. Because the DNAT doesn't alter the source IP, the responding server sends packets directly to the client PC (same subnet as the source so respond directly instead of to the UTM) confusing it because it expected a result from the UTM's public IP, not the server directly.

    Can't really use NAT in this case but I wonder if some sort of multipath rule forcing all VPN traffic across the correct WAN would work? Not near my UTM and don't play with multipath a lot so not sure how that'd be implemented.
  • Hi Andrew,

    thanks for your response. I feel it seems to be a bit difficult to explain and so I try to give some more information.

    What we have is the following:

    UTM:

    WAN1: 84.123.44.55/32 (fixed public IP)
    WAN2: 168.73.195.77/20 (DHCP) with gateway 168.73.192.1 and subnet address 168.73.192.0/20

    User at same cable provider, e.g. home office:

    WAN: 168.73.197.131/20 (DHCP) with gateway 168.73.192.1 and subnet address 168.73.192.0/20


    From home office I'm trying to access systems at work, e.g. mail, VPN or other service through the fixed public IP. For the moment let us assume, we make a simple ping.

    When the packet arrives at WAN1 then the router tries to send back an answer to 168.73.197.131. Because it can see, that this address belongs to the subnet of WAN2 it sends it out over that interface which results in ping timeout, because the answer is expected from address 84.123.44.55.

    What I tried to do is to redirect all traffic for subnet on WAN2 through WAN1 except the default gateway, because I need the gateway to establish e.g. outgoing http connections for simple web browsing. Of course I am able to redirect the traffic for the whole subnet and even exclude the assigned address on WAN2 but the problem comes when trying to exclude traffic for the default gateway (168.73.192.1), because in UTM there is no definition for it and its value can change some time. So I am not able to create a rule for traffic which should go to the default gateway of WAN2.

    Then I realized that there wouldn't be any problem if I could hide the rest of the subnet from the router. One way would be to install an additional external router this way:

    ([UTM] 10.20.30.2/30)  (10.20.30.1/30 [Router] 168.73.195.77/20)

    The router would get its public ip via DHCP. The UTM could be configured with static IPs so I am able to set up all rules I need. This would hide the subnet from the router resulting in the whole traffic being routed through WAN1.

    I feel this being a valid solution but it will cost me some bucks for additional hardware and I have to maintain configuration on an additional device.

    I wonder whether this approach can be realized in UTM itself. Perhaps someone is able to shed some more light on this.

    Thank you in advance!
  • Hi Andrew,

    thanks for your response. I feel it seems to be a bit difficult to explain and so I try to give some more information.

    What we have is the following:

    UTM:

    WAN1: 84.123.44.55/32 (fixed public IP)
    WAN2: 168.73.195.77/20 (DHCP) with gateway 168.73.192.1 and subnet address 168.73.192.0/20

    User at same cable provider, e.g. home office:

    WAN: 168.73.197.131/20 (DHCP) with gateway 168.73.192.1 and subnet address 168.73.192.0/20


    From home office I'm trying to access systems at work, e.g. mail, VPN or other service through the fixed public IP. For the moment let us assume, we make a simple ping.

    When the packet arrives at WAN1 then the router tries to send back an answer to 168.73.197.131. Because it can see, that this address belongs to the subnet of WAN2 it sends it out over that interface which results in ping timeout, because the answer is expected from address 84.123.44.55.

    What I tried to do is to redirect all traffic for subnet on WAN2 through WAN1 except the default gateway, because I need the gateway to establish e.g. outgoing http connections for simple web browsing. Of course I am able to redirect the traffic for the whole subnet and even exclude the assigned address on WAN2 but the problem comes when trying to exclude traffic for the default gateway (168.73.192.1), because in UTM there is no definition for it and its value can change some time. So I am not able to create a rule for traffic which should go to the default gateway of WAN2.

    Then I realized that there wouldn't be any problem if I could hide the rest of the subnet from the router. One way would be to install an additional external router this way:

    ([UTM] 10.20.30.2/30)  (10.20.30.1/30 [Router] 168.73.195.77/20)

    The router would get its public ip via DHCP. The UTM could be configured with static IPs so I am able to set up all rules I need. This would hide the subnet from the router resulting in the whole traffic being routed through WAN1.

    I feel this being a valid solution but it will cost me some bucks for additional hardware and I have to maintain configuration on an additional device.

    I wonder whether this approach can be realized in UTM itself. Perhaps someone is able to shed some more light on this.

    Thank you in advance!


    I am having this EXACT same issue, and I am out of ideas. I tried the policy routes, but I do not believe it's even making it to those rules.

    Anyone of the resident Sophos geniuses have any suggestions?

    Thanks,
    Mark
  • Hi, Mark and KiP, and welcome to the User BB!

    WAN2: 168.73.195.77/20 (DHCP) with gateway 168.73.192.1 and subnet address 168.73.192.0/20

    This can be easy to correct on the UTM as it's not necessary to have the subnet on the External interface be large enough to cover the default gateway.  Unfortunately, with DHCP, the ISP assigns the subnet, so you can't just change it to /32 as you could with a regular Ethernet interface definition.

    If your cable modem ISP rarely changes your IP, a temporary workaround is to change the interface definition to a static one and assign the default gateway and subnet yourself.  The real solution is to get some fixed IPs for that WAN connection.

    Cheers - Bob
  • Hi,

    I have the same problem and I have posted the question "Two internet connections trouble" on 1-21-2015. (I'm sorry to pigtail the question.)

    "Fortunately" I have fixed IP address also on the second interface so after whole day hitting my head against the wall I came to the same workaround as BAlfson suggested. But I have only one site-to-site VPN working over this interface because I have configured just one static route for it (remote LAN network is routed over ISP gateway on this interface). When someone else has tested to create default static route 0.0.0.0/0 to go to this interface ISP gateway the problem reoccurred. But I have not tried to enable IPv4 default gateway on this interface. Now this interface is cut off the internet except for the site-to-site VPN...

    Workaround for this problem could be:
    - BAlfson's sugestion
    - having on both interfaces fixed IP address with smallest mask possible.
    - having another router to establish connection to WAN2 and another private network between additional router and Astaro.

    Some manufacturers seems to use next hop IP address static routes in this cases, but I didn't had time to check if this is correct and if Astaro has this option.

    BAlfson, are you suggesting to use IPv4 default gateway also on that interface?
    Does not having configured IPv4 default gateways on both interfaces automatically enable multilink balancing? I don't need/like this. I want to have completely separated connections to internet.

    Thank you!

    Best regards, Davorin
  • Yes, Davorin, you need to activate Uplink Balancing to have two default gateways.  You can have completely separated connections using the appropriate Multipath rules.  Before going into more detail, please explain what issues drove you to the conclusion that you needed to have them "completely separated."

    It also is possible to use a static route instead of a default gateway with the second WAN connection (it's what we did before Uplink Balancing was introduced).  There are so many advantages with Uplink Balancing, Multipath Rules and Interface Groups that I don't like to go back to the "old" ways.

    Cheers - Bob
  • I'm sorry for late answer. I saw your post just now.

    The second ISP link was acquired for SIP trunk for telephony. If I recall correctly the first idea was to use load balancing. This was a couple of years ago. But the first problem was with using on-line banking as outgoing connection jumped between interfaces. Some other web sites also had problems. This was corrected with multipath rules. Then we have noticed problems, as KiP has, with mail server. We didn't get any useful information how to solve this problem, so we just disconnected the link. 

    Then the link was used for site-to-site VPN using additional router between astaro and ISP provider. Now the router was removed and Astaro is the endpoint for site-to-site VPN. And the problem arised again...

    The reason to have them separated is to keep the configuration as simple as possible. (You can read that - lack of knowledge [:)] ) And if practically all traffic needs to go over 1st interface I don't see a good reason to use link balancing.

    1st interface  (20/20 Mbps FO) is used for all clients access to internet, exchange server, dial-in VPN
    2nd interface (4/1 Mbps VDSL) is used for site-to-site VPN

    Best regards, Davorin
  • Yes, Davorin, I think if you just use the VDSL connection for an IPsec site-to-site connection, you don't need a default gateway or any static routes.

    For example, I have a client with five locations with two different ISP connections in each location.  To minimize problems with VoIP, one connection is used primarily for a VoIP VPN and the other is used for the data VPN back to the central site.  In each case, an Interface Group is used along with an Availability Group to provide for failover in either direction.  Multipath rules are in place to guarantee VoIP communication if the Data VPN should fail over to share the VoIP VPN.

    You're correct that it's simpler to do it your way, and that example solution cost them a few hours of my time to configure.

    Cheers - Bob
  • I don't know why, but an interface static route toward remote private network was needed. Without it, the VPN tunnel didn't wanted to establish the connection.
    BAlfson, thank you very much for your help!

    Regards, Davorin