No results found
We couldn't find anything using that term, please try searching for something else.
Introduction Static key configurations offer the simplest setup, and are ideal for point-to-point VPNs or proof-of-concept testing. Static Key advan
Static key configurations offer the simplest setup, and are ideal for point-to-point VPNs or proof-of-concept testing.
This example demonstrates a bare-bones point-to-point OpenVPN configuration. A VPN tunnel will be created with a server endpoint of 10.8.0.1 and a client endpoint of 10.8.0.2. Encrypted communication between client and server will occur over UDP port 1194, the default OpenVPN port.
Generate a static key:
openvpn --genkey --secret static.key
Copy the static key to both client and server, over a pre-existing secure channel.
dev tun ifconfig 10.8.0.1 10.8.0.2 secret static.key
remote myremote.mydomain dev tun ifconfig 10.8.0.2 10.8.0.1 secret static.key
Make sure that :
Bear in mind that 90% of all connection problems encountered by new OpenVPN users are firewall-related.
run openvpn using the respective configuration file on both server and client , change myremote.mydomain in the client configuration to the domain name or public ip address of the server .
To verify that the VPN is running, you should be able to ping 10.8.0.2 from the server and 10.8.0.1 from the client.
add the follow line to both client and server configuration file :
comp-lzo
Deal with:
Add the following to both client and server configuration files:
keepalive 10 60 ping-timer-rem persist-tun persist-key
Run OpenVPN as a daemon and drop privileges to user/group nobody.
add to configuration file ( client and/or server ):
user nobody group nobody daemon
Suppose the OpenVPN server is on a subnet 192.168.4.0/24. Add the following to client configuration:
route 192.168.4.0 255.255.255.0
Then on the server side, add a route to the server’s LAN gateway that routes 10.8.0.2 to the OpenVPN server machine (only necessary if the OpenVPN server machine is not also the gateway for the server-side LAN). Also, don’t forget to enable IP Forwarding on the OpenVPN server machine.