Tuesday, January 5, 2021

OpenVPN create an interface per user. Trying to replicate a Mikrotik feature on Linux.

Hoping someone here has some good Linux network or OpenVPN experience. I'm decently versed in Linux networking but can't figure out a way to do this.

Mikrotik RouterOS has a pretty sweet feature where you can define an OpenVPN server interface that's tied to a particular user ID. So under `/interface ovpn-server add` if the interface name is ovpn99 and the user is set to jbrown, then every time jbrown connects, they are bound to ovpn99. This allows you to do things like, bridge that interface into a VLAN or bind it to a VRF that other users don't have access to.

I want to do this with OpenVPN on Linux, but I'm not really sure how they do it. Maybe they just maintain a fork of OpenVPN where they do the magic internally. I'm hoping to use it with tap interfaces and bridge each user into a particular VLAN.

Anyone have any ideas?



No comments:

Post a Comment