2

I have an OpenVPN system with a number of users. I need to restrict some of the users so they can only connect from certain source IP addresses. It's not possible to simply firewall the OpenVPN port as I have other users that need to be able to connect from anywhere.

Is there a way to configure OpenVPN to restrict some clients to certain IP addresses?

By the way, this question is NOT a duplicate of this: Force (limit) OpenVPN client's IP/IPv6/lladdress

1 Answer 1

2

Yes, you can do this by writing a client-connect script that checks the source IP of the connection (in the trusted_ip or trusted_ip6 env var) and then returns non-zero if it doesn't like it. You'll need to set script-security to 2 in order to permit OpenVPN to actually run your script.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .