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

Client cert-based access-control/firewalling?

Scheduled Pinned Locked Moved OpenVPN
9 Posts 3 Posters 950 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.
  • F
    fsbrenner
    last edited by Sep 12, 2017, 8:32 AM

    Hello,

    We're running pfSense 2.26 on an OPNSense rack appliance. We use this device to provide remote access over OpenVPN to our lan, as well as to route traffic between multiple lan segments and OpenVPN site-to-site gateways. I'm looking for a way to restrict individual users' access to other network segments based on their identity, either username or, preferably their client certificates.
    My first  thought was to give static IP addresses using CSC's, then create firewall rules based on these IPs. This turns out not only to be unwieldy to maintain, but  also relatively useless in terms of security - any user with admin rights on his own box can simply change his IP address and the server will happily accept packets from the new address.

    Is there a way to enforce network access rules based on OpenVPN certificates? Or is there a better way of accomplishing this?

    Thanks,

    Frank

    1 Reply Last reply Reply Quote 0
    • C
      chriva
      last edited by Sep 12, 2017, 11:33 AM

      According to
      https://forums.openvpn.net/viewtopic.php?t=22598
      the client will be dropped if they change the IP address assigned bythe CSO.

      1 Reply Last reply Reply Quote 0
      • J
        jimp Rebel Alliance Developer Netgate
        last edited by Sep 12, 2017, 2:51 PM

        Use a separate VPN with a different CA/Cert structure for each class of users. They can't break out of the separate tunnel networks that way.

        Another more confusing and difficult option would be to setup multiple copies of the same VPN on different ports with the same CA structure and different tunnel networks, but add overrides and/or a CRL that restricts who can connect to what.

        Using separate VPNs is cleaner and less confusing to maintain, however.

        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
        • F
          fsbrenner
          last edited by Sep 12, 2017, 8:22 PM

          @chriva:

          According to
          https://forums.openvpn.net/viewtopic.php?t=22598
          the client will be dropped if they change the IP address assigned bythe CSO.

          Hmm, my setup seems not to work that way. I tried setting "ifconfig-push 192.168.100.100 255.255.255.0" in a cso for my common-name, and did indeed receive that address. However, after manually altering my local tap0 address to 192.168.100.101, I was still able to use the connection. Perhaps I'm missing some configuration parameter?

          1 Reply Last reply Reply Quote 0
          • F
            fsbrenner
            last edited by Sep 12, 2017, 8:32 PM

            @jimp:

            Use a separate VPN with a different CA/Cert structure for each class of users. They can't break out of the separate tunnel networks that way.

            Another more confusing and difficult option would be to setup multiple copies of the same VPN on different ports with the same CA structure and different tunnel networks, but add overrides and/or a CRL that restricts who can connect to what.

            Using separate VPNs is cleaner and less confusing to maintain, however.

            Looks like I may have to go the multiple server route. I had rather hoped I could avoid the hassle of distributing new certs/configs to the users - if experience is any guide, I'll be spending a lot of time on the phone hand-holding :-\

            1 Reply Last reply Reply Quote 0
            • C
              chriva
              last edited by Sep 13, 2017, 9:57 AM

              @fsbrenner:

              Hmm, my setup seems not to work that way. I tried setting "ifconfig-push 192.168.100.100 255.255.255.0" in a cso for my common-name, and did indeed receive that address. However, after manually altering my local tap0 address to 192.168.100.101, I was still able to use the connection. Perhaps I'm missing some configuration parameter?

              Tested it today: I don't get the log similar to
              MULTI: Bad source address from client [192.168.151.248], packet dropped
              but i can confirm : if the client changes to another ip the packets don't enter the VPN.

              1 Reply Last reply Reply Quote 0
              • F
                fsbrenner
                last edited by Sep 13, 2017, 10:59 AM

                Are you using tun interfaces? I suspect that my setup doesn't behave that way because I'm using Layer 2 (tap) devices.

                1 Reply Last reply Reply Quote 0
                • J
                  jimp Rebel Alliance Developer Netgate
                  last edited by Sep 13, 2017, 1:33 PM

                  If you are using tap then you absolutely need separate VPNs. Even if you could filter them at layer 3 they could still send out L2 frames you may not want them to do.

                  Do you really need tap?

                  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
                  • F
                    fsbrenner
                    last edited by Sep 14, 2017, 3:33 AM

                    Not anymore. My predecessor set up the vpn with tap in order to use our central DHCP server, but now we push addresses from the the OpenVPN server instead.
                    I guess I'll have to bite the bullet and restructure the whole setup with multiple networks. I guess it won't need to be that disruptive - I can migrate users to the networks incrementally, leaving the old setup running in parallel until everybody gets on the new setup.

                    Thanks.

                    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