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

Restrict user via VLAN

Scheduled Pinned Locked Moved FRR
12 Posts 3 Posters 614 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.
  • M
    McMurphy
    last edited by May 15, 2024, 3:59 AM

    I see I can specify a VLAN for a FreeRadius user.

    Can this be used to control what a user can access via FW rules if each VLAN has it's own interface?

    For example:
    Any user connected with VLAN ID:10 can only access server A and any user connected with VLAN ID:20 can only access server B

    J D 2 Replies Last reply May 15, 2024, 4:02 AM Reply Quote 0
    • J
      johnpoz LAYER 8 Global Moderator @McMurphy
      last edited by May 15, 2024, 4:02 AM

      @McMurphy yes you can can limit what what device in network A can talk to in network B. But you can not control what device in network A talking to a another device in network A.

      Where are these servers these users/devices will be talking too?

      An intelligent man is sometimes forced to be drunk to spend time with his fools
      If you get confused: Listen to the Music Play
      Please don't Chat/PM me for help, unless mod related
      SG-4860 24.11 | Lab VMs 2.7.2, 24.11

      M 1 Reply Last reply May 15, 2024, 4:13 AM Reply Quote 0
      • M
        McMurphy @johnpoz
        last edited by May 15, 2024, 4:13 AM

        @johnpoz

        The scenario is we have multiple users connecting to our LAN via VPN & FreeRadius.

        I wanted to group users to restrict what each group can access

        To date I have done this with with multiple OVPN servers and FW rules. One OVPN server for each group.

        I had the thought of using a single OVPN server and then use the VLAN ID in FR to control what the users can access, once they are connected. Using FW rules.

        The users are home users and the servers are on our LAN behind pfSense.

        J 1 Reply Last reply May 15, 2024, 5:13 AM Reply Quote 0
        • D
          Dobby_ @McMurphy
          last edited by May 15, 2024, 5:10 AM

          @McMurphy

          In the FreeRadius certificate you should be able to set up also the VLAN(x)
          so this user is then even at connecting into that vlan in.

          #~. @Dobby

          Turris Omnia - 4 Ports - 2 GB RAM / TurrisOS 7 Release (Btrfs)
          PC Engines APU4D4 - 4 Ports - 4 GB RAM / pfSense CE 2.7.2 Release (ZFS)
          PC Engines APU6B4 - 4 Ports - 4 GB RAM / pfSense+ (Plus) 24.03_1 Release (ZFS)

          M 1 Reply Last reply May 16, 2024, 10:14 PM Reply Quote 0
          • J
            johnpoz LAYER 8 Global Moderator @McMurphy
            last edited by May 15, 2024, 5:13 AM

            @McMurphy not sure why you need multiple vlans or networks to do such a thing.. Give user A IP address X when they connect to the vpn. Control where ip X can go with some firewall rules..

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.7.2, 24.11

            M 2 Replies Last reply May 15, 2024, 6:19 AM Reply Quote 0
            • M
              McMurphy @johnpoz
              last edited by May 15, 2024, 6:19 AM

              @johnpoz

              100 users connecting to 5 servers only needs 5 VLANs so 5 FW rules

              Is that not less admin than assigning each user an IP and managing these 100 IPs with rules?

              J 1 Reply Last reply May 15, 2024, 6:23 AM Reply Quote 0
              • J
                johnpoz LAYER 8 Global Moderator @McMurphy
                last edited by May 15, 2024, 6:23 AM

                @McMurphy you didn't say 100 users in your post ;)

                But you understand 1 vpn server can listen on multiple ports.. So have one that listens on 1194, 1195, 1196, etc..

                Users that connect to 94 can connect to whatever you want them to, setup 95 users to connect to whatever other things you want those users to connect too, etc.

                But if you control what specific IP a user gets you have the flexibility to easy give them access to whatever you want, and change that on the fly if they then need access to something else. And not have to have them connect to different networks or be giving everyone else that connects to that vpn access to the same thing, etc.

                But you don't need 5 vpn servers you only need 5 instances of of vpn running..

                An intelligent man is sometimes forced to be drunk to spend time with his fools
                If you get confused: Listen to the Music Play
                Please don't Chat/PM me for help, unless mod related
                SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                M 1 Reply Last reply May 15, 2024, 6:36 AM Reply Quote 0
                • M
                  McMurphy @johnpoz
                  last edited by May 15, 2024, 6:36 AM

                  @johnpoz

                  Apologies, could be 200+ users in the future so looking for a solution that is easy to administer.

                  If I use ports to control access the could a user not simply edit the port in their OVPN profile?

                  If I am going to assign a value to each user then I think the VLAN option is simpler, if it works...

                  J 1 Reply Last reply May 15, 2024, 11:42 AM Reply Quote 0
                  • J
                    johnpoz LAYER 8 Global Moderator @McMurphy
                    last edited by May 15, 2024, 11:42 AM

                    @McMurphy they can change the port, but its a different instance - they wouldn't have the login. Or the cert - these are different instances.

                    An intelligent man is sometimes forced to be drunk to spend time with his fools
                    If you get confused: Listen to the Music Play
                    Please don't Chat/PM me for help, unless mod related
                    SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                    M 1 Reply Last reply May 16, 2024, 10:10 PM Reply Quote 0
                    • M
                      McMurphy @johnpoz
                      last edited by May 16, 2024, 10:10 PM

                      @johnpoz

                      I am sorry however I cannot understand how a single VPN server can listed on multiple ports?

                      I have checked my OVPN server and see a fields entitled Local Port however it appears to only take a single value. I may be mixing up terminology but what is the difference between an OVPN Server and OVPN instance?

                      1 Reply Last reply Reply Quote 0
                      • M
                        McMurphy @Dobby_
                        last edited by May 16, 2024, 10:14 PM

                        @Dobby_

                        I can give the user a VLAN in the FreeRadius settings but not sure how to use that in the FW rules.

                        1 Reply Last reply Reply Quote 0
                        • M
                          McMurphy @johnpoz
                          last edited by May 16, 2024, 10:18 PM

                          @johnpoz

                          If I give each user a unique IP address in FreeRadius, is this an address from the OVPN IPv4 tunnel network?

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