Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

OpenVPN to only access remote server resources

Writer Sebastian Wright

I have set up OpenVPN server on a CentOS 8 machine in the office, wanting to access the server from home. I have noticed though that all internet traffic is being routed through then VPN. Ideally from home my internet access would be direct, and only when office based resources are required, to use the VPN connection. I have been reading about split tunneling, but don't yet know whether it is a server or client side option, or how to do it at all. Is split tunneling what I am looking for?

How can my ultimate objective be achieved?

6

1 Answer

In the case I have presented, three things were required of the VPN server configuration.

1) Eliminate the gateway redirect

;push "redirect-gateway def1 bypass-dhcp"

2) Create a specific route to the office subnet

push "route x.x.x.x 255.255.255.0"

3) Disable the push of DNS servers, in this configuration Google's IPv4 addresses:

;push "dhcp-option DNS 8.8.8.8"
;push "dhcp-option DNS 8.8.4.4"

Credit to @Tom Yan in the comments in arriving at this solution.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy