Openvpn.conf

From Sysadmin

Jump to: navigation, search

Example Server Configuration

This is an example config for the OpenVPN server openvpn.example.com. This example uses routing and accomodates client to client access. It is principally intended as a site-site VPN. The network ranges shown here are examples only.

port 1194
proto udp
dev tun
ca ca.crt
cert openvpn-server.crt
key openvpn-server.key
dh dh2048.pem
server 192.168.121.0 255.255.255.0
ifconfig-pool-persist ipp.txt
client-config-dir ccd
route 192.168.120.0 255.255.255.0
client-to-client
push "route 192.168.120.0 255.255.255.0"
keepalive 10 600
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 4
management localhost 7505

Example Client Configuration

client
dev tun
proto udp
remote openvpn.example.com 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key
comp-lzo
verb 3
user nobody
group nogroup
Personal tools