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

    Restrict user via VLAN

    Scheduled Pinned Locked Moved FRR
    12 Posts 3 Posters 1.3k 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 @johnpoz
      last edited by

      @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.

      johnpozJ 1 Reply Last reply Reply Quote 0
      • Dobby_D
        Dobby_ @McMurphy
        last edited by

        @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 Reply Quote 0
        • johnpozJ
          johnpoz LAYER 8 Global Moderator @McMurphy
          last edited by

          @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.8, 24.11

          M 2 Replies Last reply Reply Quote 0
          • M
            McMurphy @johnpoz
            last edited by

            @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?

            johnpozJ 1 Reply Last reply Reply Quote 0
            • johnpozJ
              johnpoz LAYER 8 Global Moderator @McMurphy
              last edited by

              @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.8, 24.11

              M 1 Reply Last reply Reply Quote 0
              • M
                McMurphy @johnpoz
                last edited by

                @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...

                johnpozJ 1 Reply Last reply Reply Quote 0
                • johnpozJ
                  johnpoz LAYER 8 Global Moderator @McMurphy
                  last edited by

                  @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.8, 24.11

                  M 1 Reply Last reply Reply Quote 0
                  • M
                    McMurphy @johnpoz
                    last edited by

                    @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

                      @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

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