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

    IPsec multiple Phase 2

    Scheduled Pinned Locked Moved IPsec
    14 Posts 3 Posters 704 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.
    • keyserK Offline
      keyser Rebel Alliance @0x44
      last edited by

      @0x44 Yes, by not allowing the listed traffic in the firewall rules on the interface on which the clients exists. If you have a "any - any" rule there to allow full access to to internet (and in effect also everything else through VPN, the firewall itself and so on), create a block rule above that from the clients to the networks they are not allowed to reach.

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

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

        @keyser I might not have expressed myself very clearly. But tunnels A and B share the same virtual IP pool, for example, 192.168.50.1/24, so the source IP address is the same for both tunnels.
        In this configuration, both clients have access to both networks — 10.10.10.10 and 10.10.11.10. That means, in order to restrict access from tunnel A to tunnel B (or vice versa), we would need to filter by source IP in the firewall. However, since the source is the same for both tunnels, this becomes problematic.
        Please correct me if I misunderstood your point or if I'm wrong about something.
        Below is an example of the allow rules I'm currently using.
        Firewall.png

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

          @0x44 I'm not quite sure I'm following your problem then.
          pfSense does not have a "layer 7" user concept on which you can create rules (rules against users/identities). It only does layer 2/3/4 (Ethernet/IP/Protocol) filtering.

          You mentioned virtual pool, is this because the users are also VPN clients, and you are looking to restrict to which S2S tunnel targets they are allowed to reach?

          Anyways, the only way you can restrict the access is by doing sourcefiltering in firewall rules, so you need a mechanism to make sure user A and user B always has IP addresses you know and can filter against. For regular LAN users this can be achieved by VLAN segmentation and different subnets if users A and B are each actually a large group of users. If it's just one user, you can do it by fx. DHCP reservation or use of static IPs on some clients. If they are VPN clients themselves, you need to use the "new" IP Pool feature and radius authentication of the VPN clients where you return the "Class" attribute from radius to assign which IP pool the client belongs to. If it's just two local VPN users on the firewall, you can assign their user a static VPN pool IP in the EAP-secret section, or by using Radius to return the framed-IP attribute.
          In all cases you can then filter access with source rules in the firewall rules.

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

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

            @keyser I understand now. I'm in the process of configuring RADIUS. Really appreciate your support!

            1 Reply Last reply Reply Quote 1
            • 0 Offline
              0x44
              last edited by 0x44

              I wasn't able to configure a static VPN pool IP assignment using the method where the IP is set in the EAP-Secret section, the IP address was assigned dynamically every time the user logged in.
              However, assigning a static IP via the RADIUS Framed-IP-Address attribute works perfectly. It's a reliable and effective way to ensure users always get the same IP.

              @keyser Thanks for help!

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

                @0x44 Yeah, the EAP-secret assignment model is flaky as it doesn't work with Windows Clients. If you are only working with at few clients the radius framed-ip model is great, but if you have a lot of clients I can really recommend the IP-Pool group model and returning the Class attribute instead. Then you don't have to micromanage every single client, and it works spectacularly great.
                After I got Netgate to push that feature into pfSense+ it has become an entirely new and really GREAT contender for large scale VPN deployments. I have a customer with several thousands of users where we have replaced VERY costly Cisco appliances with a "cheap" 8300 Appliance and no license costs, and are now using built OS VPN clients and EntraID 2FA authentication. They love it :-)

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

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

                  @keyser Can I ask where Class is? A while back we set up one with a few users, and used the "IPv4 Network Configuration" setting on the user. Not that we need to change, just curious.

                  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!

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

                    @SteveITS Class is a Radius standard attribute you can ask the Radius server that authenticates the VPN user to return along with the “accept” message. If the string value of the attribute equals the IP Pool Group name you configured in pfSense, the VPN user is assigned an IP address from the specified IP pool instead of the default VPN Virtual pool you have configured on the Mobile VPN setup page.

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

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

                      @keyser Is it in the FreeRADIUS package though? I've clicked around and may be blind but am not seeing it. I did find a forum post from 2015 mentioning it though. :)

                      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!

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

                        @SteveITS I’m 100% sure that Freeradius can do it - it’s very standard (for decades) radius behavior. But I don’t know if it’s available as an GUI option in the Freeradius package for pfSense. Most likely its something you have to configure as an advanced return setting on the user object or somewhere similar. I’m sure google can help here…
                        I use Microsoft NPS for my Radius needs in this case because that offers the Azure 2FA integration that requires the users to authenticate in their “Microsoft Authenticator app” on their mobile phones to establish a VPN connection.

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

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

                          @keyser OK thanks. I will table it until needed then. I did try searching and didn't find much. It's probably just not in the package.

                          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!

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

                            @SteveITS It’s there - its only a question of how to use it. I have done some Freeradius config previously, and I had freeradius return an Aruba hardware specific radius attribute to the Accesspoints. When I did that, all I had do to was use this field on the user object in freeradius:

                            e08f3713-1639-4002-826f-032b76fa57f2-image.png

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

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

                              @keyser Ah. Silly me I was looking for "class" :)

                              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 1
                              • First post
                                Last post
                              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.