Restrict OpenVPN Client to single server ??

This forum is for admins who are looking to build or expand their OpenVPN setup.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
ccuppii
OpenVpn Newbie
Posts: 1
Joined: Wed May 11, 2022 3:41 pm

Restrict OpenVPN Client to single server ??

Post by ccuppii » Wed May 11, 2022 3:52 pm

Simply put, I'm using PIVPN and need to assure that I can restrict a specific remote client to only being able to access all ports on a single IP ADDRESS. For sake of clarity, we'll say that the IP Address of this server is 192.168.0.10. The remote client should not be able to access any other IPAddresses on my local network other than 192.168.0.10 and should not use my internet service for task like internet web browsing, email etc. All they should be able to do via the OpenVPN is work with the various services on my local server which has a the static local ip address of 192.168.0.10 . I'm thinking that with many of us working from home during this pandemic, this has very likely been hashed out multiple times but I'm unable to find such info. This is the only scenario I'll likely ever use OpenVPN for, so providing specific instructions for this particular configuration would be VERY much appreciated in advance. ;)

zxun
OpenVPN User
Posts: 24
Joined: Mon Jan 04, 2021 2:26 am

Re: Restrict OpenVPN Client to single server ??

Post by zxun » Mon Jun 06, 2022 10:41 am

Simply put, you just need to delete `def1` and any other routing policies on both configurations, then the client can only access the server via its openvpn address. I have tested such access by `nc -l` on the server and `telnet` on the client. It works.

Post Reply