How to limit client access to LAN addresses?
Posted: Tue Jan 23, 2018 11:07 pm
I have an RPi3B sitting at our company main office as an OpenVPN gateway.
It was installed 3 months back and has worked just fine for what it was intended for.
It serves two UDP ports on the firewall:
- One is for clients who are going to tunnel all of their traffic through OpenVPN including LAN and Internet connections.
- The other is for clients who are only accessing the LAN itself and send their Internet access via their own ISP.
Now I have a new use case, namely to allow only access to a certain range of IP addresses on our LAN
This would be used by consultants who need access to our Subversion server on an internal Windows 2016 Server machine, while they should be blocked from accessing any of the other LAN addresses.
Can this be done on a client basis or do I need a 3rd service instance on the RPi3 to handle that?
And in either case, how could it be done? What should be entered into the configuration file?
Grateful for any suggestions. I'm not very experienced in setting up Linux networking rules and such...
EDIT:
Is it possible to use this in the server.conf file for the instance that will be limited to access only the Subversion server (which uses IP 10.0.0.10):
I.e. only pushing the route to the exact IP address of the server... (But I am not sure about the netmask setting, maybe it should be 255.255.255.240?)
If that works then the next problem is how to make this work for a specific client and have all others use the regular LAN route?
It was installed 3 months back and has worked just fine for what it was intended for.
It serves two UDP ports on the firewall:
- One is for clients who are going to tunnel all of their traffic through OpenVPN including LAN and Internet connections.
- The other is for clients who are only accessing the LAN itself and send their Internet access via their own ISP.
Now I have a new use case, namely to allow only access to a certain range of IP addresses on our LAN
This would be used by consultants who need access to our Subversion server on an internal Windows 2016 Server machine, while they should be blocked from accessing any of the other LAN addresses.
Can this be done on a client basis or do I need a 3rd service instance on the RPi3 to handle that?
And in either case, how could it be done? What should be entered into the configuration file?
Grateful for any suggestions. I'm not very experienced in setting up Linux networking rules and such...
EDIT:
Is it possible to use this in the server.conf file for the instance that will be limited to access only the Subversion server (which uses IP 10.0.0.10):
Code: Select all
#Company local network
#push "route 10.0.0.0 255.255.255.0"
#Limited access:
push "route 10.0.0.10 255.255.255.245"
If that works then the next problem is how to make this work for a specific client and have all others use the regular LAN route?