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

IPSec established, no communication possible

We have configured an IPSec VPN to one of our partner organizations. The connection is successfully established. Due to confidentiality requirements I am unable to name IP addresses here and have thus replaced all addresses with placeholders. The topology looks like:

"Local private net"/24="Local public IP"  "Remote public IP"="Remote public net"/24

The automatic firewall rules option was enabled, no further firewall rules concerning these networks were configured. The IPSec log shows no errors; the firewall log shows no dropped packets throughout our tests. Both the local software UTM (version 9.206-35) and the remote Juniper firewall are configured to allow ICMP traffic.

A computer attached to the "local private net"/24 network with the IP address "local private IP" in the same network was used to ping the remote IP "Remote IP 1" computer in the "remote public net"/24. The ping yields no response. We can ping into other local networks from the "local private IP" computer.

Another test was to request an HTTPS site using wget on the "local private IP" from "Remote IP 2" in the "remote public net"/24. This did not work either and the firewall log showed no dropped packets.

We captured the IP traffic on the public facing interface of the UTM using tcpdump and saw no IPSec related traffic at all, but we did see unencrypted ICMP requests from "local private IP" to "remote IP 1" on that interface. As far as we understand, we should not see that traffic but instead the encrypted IPSec traffic?

We tried to see if we can gather more information on what is going on on the IPSec connection and tried:
# ip -s xfrm state

src "remote public IP" dst "local public IP"
proto esp spi 0xfd72dd09(4252163337) reqid 16385(0x00004001) mode tunnel
replay-window 32 seq 0x00000000 flag noecn nopmtudisc af-unspec (0x00100101)
auth-trunc hmac(sha1)
 0***************************************xx (160 bits) 96
enc cbc(aes) 0***************************************************************xx (256 bits)
lifetime config:
  limit: soft (INF)(bytes), hard (INF)(bytes)
  limit: soft (INF)(packets), hard (INF)(packets)
  expire add: soft 0(sec), hard 0(sec)
  expire use: soft 0(sec), hard 0(sec)
lifetime current:
  0(bytes), 0(packets)
  add 2014-09-12 09:48:37 use -
stats:
  replay-window 0 replay 0 failed 0
src "local public IP" dst "remote public IP"
proto esp spi 0x51a16278(1369531000) reqid 16385(0x00004001) mode tunnel
replay-window 32 seq 0x00000000 flag noecn nopmtudisc af-unspec (0x00100101)
auth-trunc hmac(sha1) 0***************************************xx (160 bits) 96
enc cbc(aes) 0***************************************************************xx (256 bits)
lifetime config:
  limit: soft (INF)(bytes), hard (INF)(bytes)
  limit: soft (INF)(packets), hard (INF)(packets)
  expire add: soft 0(sec), hard 0(sec)
  expire use: soft 0(sec), hard 0(sec)
lifetime current:
  2772(bytes), 33(packets)
  add 2014-09-12 09:48:37 use 2014-09-12 10:36:58
stats:
  replay-window 0 replay 0 failed 0


According to our understanding, this shows that packets are transmitted into the IPSec tunnel. The packet counter for the second entry is increasing while the ping continues. No response packets from the remote end are received.

On the remote end a Juniper firewall is used and the network engineer there can also see that packets are transmitted into the tunnel but no response packets are received.

Do any of you have any idea on how we can solve this problem? Do you need any additional information?


This thread was automatically locked due to age.
  • The target system you try to reach has correct gateway setting?

    Sorry if this question sounds silly, but here most of this problems are caused by a forgotten gateway entry.

    Edit: the others have a blocking windows firewall...
  • 1st Step: Check if the IKE SA _and_ IPsec SA are successfully established
    2nd: Uncheck "automatic firewall rules" and write a appropriate (http/https) fw-rule.
    3rd: Check if the packets are passing the firewall with the Firewall/Packetfilter Log

    Same on the other side.
    Hint: NAT-T needs 4500/udp

    As already mentioned: ICMP-only Tests could be sometimes misleading due to local/personal Firewalls.

    Sgt. Pepsi
  • 1st Step: Check if the IKE SA _and_ IPsec SA are successfully established
    2nd: Uncheck "automatic firewall rules" and write a appropriate (http/https) fw-rule.
    3rd: Check if the packets are passing the firewall with the Firewall/Packetfilter Log

    Same on the other side.
    Hint: NAT-T needs 4500/udp

    As already mentioned: ICMP-only Tests could be sometimes misleading due to local/personal Firewalls.


    1. Both established successfully:

    2014:09:12-15:28:56 musc055-1 pluto[21649]: "S_JPL HP3 VPN Connection" #1: received Vendor ID payload [Dead Peer Detection]
    
    2014:09:12-15:28:56 musc055-1 pluto[21649]: "S_JPL HP3 VPN Connection" #1: received Vendor ID payload [RFC 3947]
    2014:09:12-15:28:56 musc055-1 pluto[21649]: "S_JPL HP3 VPN Connection" #1: ignoring Vendor ID payload [699369228741c6d4ca094c93e242c9de19e7b7c60000000500000500]
    2014:09:12-15:28:56 musc055-1 pluto[21649]: "S_JPL HP3 VPN Connection" #1: enabling possible NAT-traversal with method 3
    2014:09:12-15:28:56 musc055-1 pluto[21649]: "S_JPL HP3 VPN Connection" #1: NAT-Traversal: Result using RFC 3947: no NAT detected
    2014:09:12-15:28:56 musc055-1 pluto[21649]: "S_JPL HP3 VPN Connection" #1: Peer ID is ID_IPV4_ADDR: 'Remote public IP'
    2014:09:12-15:28:56 musc055-1 pluto[21649]: "S_JPL HP3 VPN Connection" #1: Dead Peer Detection (RFC 3706) enabled
    2014:09:12-15:28:56 musc055-1 pluto[21649]: "S_JPL HP3 VPN Connection" #1: ISAKMP SA established
    2014:09:12-15:28:56 musc055-1 pluto[21649]: "S_JPL HP3 VPN Connection" #2: initiating Quick Mode PSK+ENCRYPT+TUNNEL+UP {using isakmp#1}
    2014:09:12-15:28:56 musc055-1 pluto[21649]: id="2203" severity="info" sys="SecureNet" sub="vpn" event="Site-to-site VPN up" variant="ipsec" connection="JPL HP3 VPN Connection" address="local public IP" local_net="local private net/24" remote_net="remote public net/24"
    2014:09:12-15:28:56 musc055-1 pluto[21649]: "S_JPL HP3 VPN Connection" #2: sent QI2, IPsec SA established {ESP=>0x482f88cf 


    2. I disabled the automatic firewall rules and added two rules:

    "Local private net"/24 with Any protocol to "remote public net"/24 with logging
    "Remote public net"/24 with Any protocol to "local private net"/24 with logging

    3. And tried both the ping and the HTTPS request again with no luck. The packets are let through according to the firewall log, but there are no response packets.

    There is no NAT involved on both sides. My UTM is behind another upstream firewall that is configured to let IPSec traffic pass, but does not do any NAT (I have a true publicly routable IP address). The other side also has no NAT involved.

    The computer on my side is a Linux machine and has an empty iptables. It is also pingable from a different host. I can't speak for the other side because I don't have any kind of access there. But they have literally decades of experience with that stuff, so I am very sure that there are no personal firewalls involved there either.

    Thank you very much for your response!
  • Hi, Sarek, and welcome to the User BB!

    the firewall log showed no dropped packets.

    Please examine the other items listed in #1 in Rulz.  Any hints there?

    The "Any" Service does not apply to pings.  You have to use the "Ping" definition.  This is consistent with the fact that outbound pinging is regulated on the 'ICMP' tab.

    Having said all that, I agree with papa_ that this feels like a routing problem on the other end.  If SNATting '"Local private net"/24 -> "Remote public net"/24' traffic from the inside IP of the remote router solves the problem, then you will have your proof.

    Cheers - Bob
    PS  Then again, I'm assuming you have broken #3 or #3.1 in Rulz.
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA