0

How can I setup OpenVPN in conjunction with my firewall in such a way that my VPN users' traffic is DROPed by default to all network resources, and only ACCEPTed through the firewall if that user requires access to the specific resource?

I have an OpenVPN server running on an OpnSense firewall in our network. My understanding is that limiting the routes pushed to the VPN client by the VPN server (eg using route in server.conf) is not sufficient to limit access to the network as-needed, because the user can just add routes on their laptop after they connect.

To actually limit access to the network, we need to configure the firewall to ACCEPT packets going from a given VPN user to a given resource only as-needed, and default to DROP for everything else.

There's a few complexities with this:

  1. A firewall doesn't have a notion of what a "VPN user" is. As far as I know, it only can match based on source IP Address

  2. In fact, a "VPN user" could have multiple IP Addresses because we want our users to be able to connect to the VPN simultaneously with the same account from many devices (eg laptop, desktop, phone, tablet).

  3. Let's say we grow to 1,000+ VPN users, how do we manage all of this in a sane way?

What's the best way to limit access to our private network from our OpenVPN clients on an as-needed basis (following the principal of least privilege) using OpnSense in a way that scales?

Michael Altfield
  • 525
  • 6
  • 18
  • How would the firewall know what resource a user needs access to? Today I need access to ServerA. Tomorrow I need access to ServerB. – joeqwerty Feb 18 '21 at 14:31
  • Your title at the org determines what servers you need access to (for ease of maintenance, some user -> group-defined-dest-subnets/IPs -> firewall mappings would be great, and are in-scope as part of this question). That shouldn't change day-to-day, but may change if you get a promotion. This question is about how to configure the firewall based on the user (source) not the destination (server). The server-side of the rules are easy because servers have static IPs set by the server, which we can trust. – Michael Altfield Feb 18 '21 at 14:45

0 Answers0