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

    Firewall rules for Road Warrior IPSEC VPN?

    Scheduled Pinned Locked Moved IPsec
    4 Posts 2 Posters 4.0k Views
    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.
    • J
      jeffhammett
      last edited by

      I have followed the instructions here (https://doc.pfsense.org/index.php/IPsec_Road_Warrior/Mobile_Client_How-To) to setup a Road Warrior IPSEC VPN on two different pfSense routers. I followed the instructions exactly on both.

      The first pfSense already has some site to site IPSEC tunnels setup. Road Warrior VPN works fine on it with a fully updated iPhone. This pfSense where both site to site and road warrior IPSEC is working does not have any apparent firewall rules to allow IPSEC, but it is working.

      The second pfSense did not previously have any IPSEC connections setup. I setup the Road Warrior IPSEC VPN per the instructions and got the message: The VPN Server Did Not Respond on the iPhone.

      I did a packet capture on the WAN interface and saw traffic to UDP port 500. So i created a WAN firewall rule to allow it and tried again. This time I got a message that the VPN failed to negotiate and saw UDP port 4500 traffic. Created another firewall rule and now the iPhone connects just fine and everything seems to be working.

      My questions are:

      1. Why does one pfSense need WAN firewall rules while the other does not?
      2. Does anything else need to be done to ensure proper VPN functionality on the pfSense where I had to manually create the WAN firewall rules?

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        Firewall rules are always needed however in some cases they are made automatically for you. There is an option for automatic firewall rules for IPsec VPNs (System > Advanced, Firewall/NAT tab) โ€“ perhaps those rules are disabled on one?

        Is the IPsec VPN using your WAN IP address on both? Or perhaps an IP alias or CARP VIP? That could also affect it.

        For IPsec traffic you'll want to allow udp/500, udp/4500, and ESP (the whole protocol, not a port) for proper operation

        Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • J
          jeffhammett
          last edited by

          @jimp:

          Firewall rules are always needed however in some cases they are made automatically for you. There is an option for automatic firewall rules for IPsec VPNs (System > Advanced, Firewall/NAT tab) โ€“ perhaps those rules are disabled on one?

          Is the IPsec VPN using your WAN IP address on both? Or perhaps an IP alias or CARP VIP? That could also affect it.

          For IPsec traffic you'll want to allow udp/500, udp/4500, and ESP (the whole protocol, not a port) for proper operation

          When the IPSEC firewall rules are automatically made, are they invisible? Or should they show up somewhere?

          The pfSense where I didn't need to manually create any rules has no visible rules I can find allowing IPSEC traffic, but it does work.

          The 'Disable Auto-added VPN rules' is unchecked on both routers.

          IPSEC VPN is using WAN IP on both.

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            They don't show in the GUI, but you'd see them in /tmp/rules.debug or the live pf rules (e.g. pfctl -sr)

            Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

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