OpenVPN Configuration: #Allows Clients to Access Resources via a private IP.

This is the eleventh in a series of posts, featuring Protips, tips, tricks, hacks, and secrets provided by Our Team 🙊 — We want to share our top tips for the growing and thriving Linux community out there. Because sometimes you need a little help...

OpenVPN Configuration: #Allows Clients to Access Resources via a private IP.
Photo by yannick Coffi see more @ yannickcoffi -/- PRINTS -/- yC


This is a series of posts focusing on useful OpenVPN server configuration options such as: #the use of secure cryptographic algorithms#client-to-client communication and so forth …

Ensure that all options are included and saved in your OpenVPN server configuration file. ie: /etc/openvpn/server.conf

🎧



When you configure OpenVPN to allow access via a private IP, you essentially create a secure virtual private network (VPN) that lets devices on the VPN access a private internal network (such as a local area network or LAN) behind the VPN server.

This is useful for remote users who need to securely access resources (like file servers, printers, or other networked devices) that are only available within the private network, you need to use the "push" directive.



Add those lines to your configuration file:

push "route 192.168.1.0 255.255.255.0"  # Adjust this to your private network

In this instance:

  • push: This keyword is used in the OpenVPN server configuration to send configuration options to the clients when they connect.
  • route: This keyword specifies a network route.
  • 192.168.1.0: This is the network address of the private network you want to make accessible to the VPN clients.
  • 255.255.255.0: This is the subnet mask, indicating that the route is for the entire 192.168.1.0/24 subnet.

Ensure that the private network route (192.168.1.0 255.255.255.0) is adjusted according to your actual private network.

Verifying the Connection

Once the VPN is connected, you should be able to access the private network through the VPN. Verify this by pinging a device on the private network (e.g., ping 192.168.1.1).

By following these steps, you will have configured an OpenVPN server to allow access via a private IP and set up a client to connect to this server. Adjust the configurations as needed to match your specific network setup.

We hope this was of great use!

Keep Us Caffeinated  ⦿ ⦿