Important note about SSL VPN compatibility for 20.0 MR1 with EoL SFOS versions and UTM9 OS. Learn more in the release notes.

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 IPSEC VPN routing problems

I have two Sophos XG firewalls (these are both the free "for home" software appliances) and a third Palo Alto firewall that I am attempting to connect using site-to-site IPSEC tunnels. Although it appears that I've got the tunnels up and working, I'm having trouble getting any traffic to pass through the tunnels.

I'm attempting to get the connectivity between the two Sophos XG firewalls first, as it seems that connecting two of the same device should be straightforward and neatly avoid any interop/compatibility snafus. The IPSEC tunnel is showing two green lights - active and connected. The tunnel is configured as site to site with a preshared key, and I've confirmed that the local/remote networks match. The Phase 1 encryption in the policy is AES256/SHA2 256; phase 2 is AES256/SHA2 512.

I believe the tunnel itself is operational; 'show vpn connection status' within the CLI gives this (I've changed the IPs to protect the innocent):

"RemoteSiteA-1": 10.10.35.0/24===9.100.0.2---9.100.0.1...9.200.0.2===10.0.64.0/24; erouted; eroute owner: #188
"RemoteSiteA-1":     srcip=unset; dstip=unset;
"RemoteSiteA-1":   ike_life: 28800s; ipsec_life: 3600s; rekey_margin: 120s; rekey_fuzz: 0%; keyingtries: 3
"RemoteSiteA-1":   policy: PSK+ENCRYPT+COMPRESS+TUNNEL+PFS+failureDROP; prio: 24,24; interface: Port3; encap: esp;
"RemoteSiteA-1":   dpd: action:restart; delay:30; timeout:120;
"RemoteSiteA-1":   newest ISAKMP SA: #187; newest IPsec SA: #188;
"RemoteSiteA-1":   IKE algorithms wanted: AES_CBC(7)_256-SHA2_256(4)-MODP2048(14); flags=strict
"RemoteSiteA-1":   IKE algorithms found: AES_CBC(7)_256-SHA2_256(4)_256-MODP2048(14)
"RemoteSiteA-1":   IKE algorithm newest: AES_CBC_256-SHA2_256-MODP2048
"RemoteSiteA-1":   ESP algorithms wanted: AES(12)_256-SHA2_512(7); flags=strict
"RemoteSiteA-1":   ESP algorithms loaded: AES(12)_256-SHA2_512(7); flags=strict
"RemoteSiteA-1":   ESP algorithm newest: AES_256-HMAC_SHA2_512; pfsgroup=<Phase1>

#188: "RemoteSiteA-1":500 STATE_QUICK_R2 (IPsec SA established); EVENT_SA_REPLACE in 2080s; newest IPSEC; eroute owner
#188: "RemoteSiteA-1" esp.ca60b0ca@9.200.0.2 esp.a24bd723@9.100.0.2 comp.9d2f@9.200.0.2 comp.7886@9.100.0.2 tun.0@9.200.0.2 tun.0@9.100.0.2
#187: "RemoteSiteA-1":500 STATE_MAIN_R3 (sent MR3, ISAKMP SA established); EVENT_SA_REPLACE in 27279s; newest ISAKMP; lastdpd=18s(seq in:719 out:0)

The event logs in the GUI appear to indicate success, as well: 

packet from 9.200.0.2:500: "RemoteSiteA-1" DPD: Dead peer detection enabled
IPSec Connection RemoteSiteA-1 between 10.10.35.0/24 and 10.0.64.0/24 established.
packet from 9.200.0.2:500: RemoteSiteA-1 EST-P2: Responding to a Phase-2 establishment request with message id 8e984811
packet from 9.200.0.2:500: "RemoteSiteA-1" DPD: Dead peer detection enabled
packet from 9.200.0.2:500: RemoteSiteA-1 EST-P1-MM peer id is ID_IPV4_ADDR: '9.200.0.2'
packet from 9.200.0.2:500: NAT-T :No NAT device detected between Local Server and Remote Server
"RemoteSiteA-1" EST-P1-MM: Responding to establishment request from peer
"RemoteSiteA-1" activation: Activated Successfully
packet from 9.200.0.2:500: RemoteSiteA-1 SA-MGT: Peer requested to delete Phase-1 SA. Deleting ISAKMP state 185
IPSec Connection RemoteSiteA-1 between 10.10.35.0/24 and 10.0.64.0/24 terminated.
packet from 9.200.0.2:500: RemoteSiteA-1 SA-MGT: Peer requested to delete Phase-2 SA. Deleting IPSEC state 186 

Both sides have any/any LAN -> VPN and VPN -> LAN firewall rules in place. 

According to the knowledge base article on the topic (https://community.sophos.com/kb/en-US/123320), this configuration is all that is needed to establish this connection. The XG devices are at this point expected to automatically handle any routing necessary to facilitate passing of traffic across this link.

But it's not working - I cannot get valid responses back from either side.

A few other observations based on my troubleshooting:

  • For completeness, I have double-confirmed that all traffic is using the reaching the XG as expected. It is the egress firewall for both sites. There are no routing loops on either side. As I mentioned above, I've got any/any rules for VPN <-> LAN on both sides.
  • There's no way to add static routes to 'force' traffic to the ipsec tunnel via the GUI, as the static route configuration page in the GUI only lists the physical ports (Port1, Port2, Port3, etc).
  • On a lark, I successfully established a GRE tunnel between these firewalls (and passed traffic!) but couldn't get the GRE tunnel to use the IPSEC tunnel. While this serves to confirm that there's no other barriers in the way (such as software firewalls, or other IP configuration problems), encapsulated-but-unencrypted traffic over the WAN is mildly horrifying.
  • There's a few CLI options that I've toggled back and forth but they haven't made any apparent changes.

    ‘system diagnostics utilities route lookup <ip>' is the nearest thing that I've been able to locate to a routing table; when the GRE tunnel is up, it reports '<ip> is located on the gre, <ip> is not behind a router.'

    With just the IPSEC tunnel up, it reports '<ip> is located on the Port3, <ip> is reached through the router 9.100.0.1'. In this case, Port 3 is WAN and the router listed is my next-hop.

    I used the command 'system ipsec_route add net 10.0.64.0/255.255.255.0 tunnelname RemoteSiteA' to add what appears to be a static route (on both ends). This does change the output of the route lookup command ('<ip is located on ipsec0, <ip> is not behind a router') but traffic still does not pass.
  • I've confirmed the route_precedence is 1.) VPN, 2.) Static.
  • Using the packet capture utility, I’m able to see ICMP traffic from either side of the tunnel. The entries list the expected private source/destination IP address, and the out interface is listed as ipsec0. It lists the correct rule ID for the ANY/ANY rule, and a status of “Forward…”, but the ping gets a request timeout.

 

Any ideas? Thanks in advance for any help!



This thread was automatically locked due to age.
  • Josh,

    Goes to advanced Shell and send here the result of following commands:

    ifconfig ipsec0

    ip route list.

    Results from both sides of VPN.

    Luiz Mauricio Barcelos da Silva

    SN Informatica Ltda

    Sophos XG Architect

  • Thanks for your response. The first output below matches the firewall that I had included the log messages from above.

    # Main Office

    SFVH_SO01_SFOS 15.01.0 MR-3# ifconfig ipsec0
    ipsec0 Link encap:Ethernet HWaddr 0A:74:F7:23:2A:CA
    inet addr:169.254.234.5 Bcast:0.0.0.0 Mask:255.255.255.255
    inet6 addr: fe80::874:f7ff:fe23:2aca/64 Scope:Link
    UP BROADCAST RUNNING NOARP MULTICAST MTU:16260 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

    SFVH_SO01_SFOS 15.01.0 MR-3# ip route list
    10.10.35.0/26 dev Port1 proto kernel scope link src 10.10.35.45
    10.10.35.64/26 dev Port2 proto kernel scope link src 10.10.35.95
    10.255.0.0/24 dev GuestAP proto kernel scope link src 10.255.0.1
    9.100.0.0/22 dev Port3 proto kernel scope link src 9.100.0.1

    # RemoteSiteA

    SFVH_SO01_SFOS 15.01.0 MR-3# ifconfig ipsec0
    ipsec0 Link encap:Ethernet HWaddr FA:CF:CE:77:30:6B
    inet addr:169.254.234.5 Bcast:0.0.0.0 Mask:255.255.255.255
    inet6 addr: fe80::f8cf:ceff:fe77:306b/64 Scope:Link
    UP BROADCAST RUNNING NOARP MULTICAST MTU:16260 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

    SFVH_SO01_SFOS 15.01.0 MR-3# ip route list
    10.0.0.0/16 via 10.0.192.1 dev Port1 proto static
    10.0.192.0/24 dev Port1 proto kernel scope link src 10.0.192.254
    10.81.234.0/24 dev tun0 proto kernel scope link src 10.81.234.5
    9.200.0.0/23 dev Port2 proto kernel scope link src 9.200.0.2

  • Josh,

    Appears you don't have routes registered in your Sophos to this tunnel.

    Try the following Documents:

    https://community.sophos.com/kb/en-us/122999

    To Specify the Source IP Address in traffic generated by Sophos Appliance.

    https://community.sophos.com/kb/en-us/123334

    To Spcify Routes to VPN IPSec Tunnel.

    Regards,

  • To me...this is telling me the following:

    1) Never switch away from my SG UTM 9.x appliances.

    2) This issue existed in Cyberoam, and still exists in your SF-OS. A Site-to-Site VPN just 'stops' working, green lights are on, your link indication says all LANs establised, then just out of nowhere it STOPS passing traffic.  There should not need to be ADDITIONAL configuration after just configuring a reported green light Site-to-Site, if you are going to build a GUI Firewall, these CLI workarounds are not worth it. For that, Ill stick to my SG UTM 9.x 

    So disappointing.

  •  

    Thats the reason to switch to XG and use Route based VPN, as you do not have to do this at all. Simply put a Route based VPN Tunnel and NAT on the Tunnel Interface. Thats it. 

    __________________________________________________________________________________________________________________