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

IPSec mobile client works, even though no incoming Pass rule on WAN interface

Scheduled Pinned Locked Moved 2.2 Snapshot Feedback and Problems - RETIRED
9 Posts 6 Posters 1.4k 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.
  • B
    bradsm87
    last edited by Nov 25, 2014, 3:58 AM

    Hi,

    I can connect to the VPN fine as an IPSec mobile client despite not having Pass firewall rules for UDP 500 and ESP. Isn't it supposed to be block all incoming, unless otherwise specified?

    The problem is that I can see in the logs that I'm getting constant login/connection attempts from overseas IP addresses to IPSec. I want to be able to lock down the Pass rule to only a handful of local ISP's IP ranges.
    Rules.png
    Rules.png_thumb

    1 Reply Last reply Reply Quote 0
    • D
      dstroot
      last edited by Nov 25, 2014, 4:32 AM

      It's not well documented but AFAIK the pass rules are automatically added when you setup the IPSec VPN and for some reason they are also hidden.  In other words I think it is working as intended.

      1 Reply Last reply Reply Quote 0
      • D
        dstroot
        last edited by Nov 25, 2014, 5:05 AM

        Could you share your sanitized config?  I am having a hell of a time getting it working with iOS 8.1

        Thanks in advance, 
        Dan

        1 Reply Last reply Reply Quote 0
        • ?
          Guest
          last edited by Nov 25, 2014, 9:46 AM

          I'd like to second the request for a working mobile IPsec configuration.  Also, what client-side software are you using?  I've been unable to connect using Shrew Soft (see https://forum.pfsense.org/index.php?topic=84142).

          As for the firewall rules, AFAIK they are created (and intentionally hidden) along with the IPsec rules tab when you enable IPsec, as dstroot said.

          1 Reply Last reply Reply Quote 0
          • H
            Hugovsky
            last edited by Nov 25, 2014, 10:36 AM

            Here's mine(working with shrew soft and iphone iOS 7.1.2):

            <ipsec><client><enable><user_source>Local Database</user_source>
            <group_source>system</group_source>
            <pool_address>10.10.1.0</pool_address>
            <pool_netbits>24</pool_netbits>
            <dns_server1>192.168.50.1</dns_server1></enable></client>
            <phase1><ikeid>1</ikeid>
            <iketype>ikev1</iketype>
            <interface>wan</interface>
            <mobile><mode>aggressive</mode>
            <protocol>inet</protocol>
            <myid_type>myaddress</myid_type>
            <myid_data><peerid_type>user_fqdn</peerid_type>
            <peerid_data>loreumipsum</peerid_data>
            <encryption-algorithm><name>aes</name>
            <keylen>256</keylen></encryption-algorithm>
            <hash-algorithm>sha1</hash-algorithm>
            <dhgroup>2</dhgroup>
            <lifetime>86400</lifetime>
            <pre-shared-key>KEYKEYKEY</pre-shared-key>
            <private-key><certref><caref><authentication_method>xauth_psk_server</authentication_method>

            <nat_traversal>force</nat_traversal></caref></certref></private-key></myid_data></mobile></phase1>
            <phase2><ikeid>1</ikeid>
            <uniqid>5456653a0c02a</uniqid>
            <mode>tunnel</mode>
            <localid><type>lan</type></localid>
            <remoteid><type>mobile</type></remoteid>
            <protocol>esp</protocol>
            <encryption-algorithm-option><name>aes</name>
            <keylen>256</keylen></encryption-algorithm-option>
            <hash-algorithm-option>hmac_sha1</hash-algorithm-option>
            <pfsgroup>0</pfsgroup>
            <lifetime>28800</lifetime></phase2>
            <enable></enable></ipsec>

            1 Reply Last reply Reply Quote 0
            • J
              jimp Rebel Alliance Developer Netgate
              last edited by Nov 25, 2014, 2:47 PM

              Rules for the WAN for IPsec have been created by default in the background for many years (Since 1.2 at least). When mobile IPsec is setup it has to allow from anywhere since the clients can connect from anywhere.

              These rules can be disabled under System > Advanced on the Firewall/NAT tab, check "Disable all auto-added VPN rules"

              Before you check that box, add your own rules to pass ESP, udp/500 and udp/4500 on the WAN, but you can also add block rules to prevent some from reaching the port.

              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
              • D
                dstroot
                last edited by Nov 26, 2014, 12:24 AM

                Hugovsky - thanks for the config!

                1 Reply Last reply Reply Quote 0
                • C
                  cmb
                  last edited by Nov 26, 2014, 1:54 AM

                  @jimp:

                  Rules for the WAN for IPsec have been created by default in the background for many years (Since 1.2 at least).

                  Since forever actually, that was brought over from m0n0wall. We added an option to disable them for those who want to DIY several years back, in 1.2 IIRC.

                  1 Reply Last reply Reply Quote 0
                  • B
                    bradsm87
                    last edited by Nov 26, 2014, 5:25 AM

                    @jimp:

                    Rules for the WAN for IPsec have been created by default in the background for many years (Since 1.2 at least). When mobile IPsec is setup it has to allow from anywhere since the clients can connect from anywhere.

                    These rules can be disabled under System > Advanced on the Firewall/NAT tab, check "Disable all auto-added VPN rules"

                    Before you check that box, add your own rules to pass ESP, udp/500 and udp/4500 on the WAN, but you can also add block rules to prevent some from reaching the port.

                    Excellent. Thanks. I'll give it a go.

                    1 Reply Last reply Reply Quote 0
                    1 out of 9
                    • First post
                      1/9
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                      This community forum collects and processes your personal information.
                      consent.not_received