Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Windows Server IPSec VPN Behind pfSense

    Scheduled Pinned Locked Moved IPsec
    5 Posts 3 Posters 1.1k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C Offline
      Cortexian
      last edited by

      I'm at my wits end here after trying to figure out why I cannot get a connection to my Windows Server 2025 IPSec IKEv2 VPN.

      Connection is getting dropped prior to the pfSense firewall and I can only assume it's because the built-in VPN/IPSec module is doing something.

      Running packet capture on my WAN interface I can see the incoming connection requests to my public IP, port 500 UDP when I try to connect.

      When I check the firewall logs, there are absolutely NO entries (pass or drop) during the same period for ANYTHING remotely related to the connection I'm trying to make. No port 500 UDP traffic showing on the public IP or internal IP of the Windows Server machine.

      I've disabled the "Auto-added VPN rules" under System > Advanced > General and verified that there are no pfSense IPSec tunnels configured at all.

      I've gone through all my NAT/firewall rules manually, and with AI assistance to ensure there are no other rules conflicting with UDP 500/4500.

      Since nothing shows in the firewall logs, but does show hitting the WAN interface during packet inspection, I can only assume that something else is hooking that traffic before it makes it to the firewall. No idea how to proceed from here.

      keyserK 1 Reply Last reply Reply Quote 0
      • keyserK Offline
        keyser Rebel Alliance @Cortexian
        last edited by

        @Cortexian I assume your Windows server is behind pfSense (NAT’ed)?

        Start by doing a packet capture on LAN to see if pfSense is forwarding the NAT’ed packets as expected - then you know if its Windows or pfSense not doing it’s thing.

        On another note,, why not let pfSense run the VPN service? It’s a built in feature, works beautifully, and they you can access the Windows server for updates and management without fear of cutting your own VPN.

        Love the no fuss of using the official appliances :-)

        C 1 Reply Last reply Reply Quote 0
        • C Offline
          Cortexian @keyser
          last edited by Cortexian

          @keyser Thank you for the comment! This is a POC, pfSense won't be involved in the final deployment.

          Yes the Windows server is behind pfSense. I have port forwarding setup with the associated rule as required.

          Packet capture on the LAN interface shows the traffic is going to the correct internal IP address. Does that mean the firewall is functioning even though there's nothing in the log showing the rule passing traffic?

          keyserK S 2 Replies Last reply Reply Quote 0
          • keyserK Offline
            keyser Rebel Alliance @Cortexian
            last edited by

            @Cortexian If the packets are forwarding to the correct internal IP, then the NAT/Firewall rule is working as expected.
            Please note that pfSense does not log packets on rules by default. You have to select the “log” setting on your NAT rule for that to happen.
            Also, pfSense does not log every packet - it only logs new “states/connections”. So once a state or connection is made you do not get log entries for additional packets in that connection. If you have a very active log, you probably need to filter it to even notice the logentry

            Love the no fuss of using the official appliances :-)

            1 Reply Last reply Reply Quote 0
            • S Offline
              SteveITS Rebel Alliance @Cortexian
              last edited by

              @Cortexian is the Windows firewall disabled/configured?

              https://docs.netgate.com/pfsense/en/latest/troubleshooting/nat-port-forwards.html

              Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
              When upgrading, allow 10-15 minutes to reboot, or more depending on packages, and device or disk speed.
              Upvote 👍 helpful posts!

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.