Servidor
/etc/openvpn/server.conf
port 443 proto tcp dev tun ca ca.crt cert servidor.crt key servidor.key dh dh1024.pem server 172.16.4.0 255.255.255.0 ifconfig-pool-persist ipp.txt client-to-client client-cert-not-required username-as-common-name plugin /etc/openvpn/openvpn-auth-pam.so "/etc/pam.d/vuser" reneg-sec 0 duplicate-cn push "route 172.16.1.1 255.255.255.255" push "dhcp-option DNS 172.16.1.1" keepalive 10 120 comp-lzo max-clients 30 user nobody group nogroup persist-key persist-tun status openvpn-status.log log /var/log/openvpn.log log-append /var/log/openvpn.log verb 5 management 127.0.0.1 1195
dev tun tun-mtu 1500 proto udp port 1194 tls-server ca /etc/openvpn/easy-rsa/keys/ca.crt cert /etc/openvpn/easy-rsa/keys/server.crt key /etc/openvpn/easy-rsa/keys/server.key dh /etc/openvpn/easy-rsa/keys/dh2048.pem server 172.16.4.0 255.255.255.0 client-to-client #push "route 10.0.0.0 255.255.0.0" #push "route-gateway 192.168.103.1" #keepalive 10 120 ping 10 ping-restart 120 status-version 1 status /var/log/ovpnserver.log 30 ifconfig-pool-persist /etc/openvpn/clients.txt cipher BF-CBC comp-lzo max-clients 16 user nobody persist-key persist-tun verb 3 duplicate-cn log /var/log/openvpn-server.log status /etc/openvpn/server.status
Cliente
/etc/openvpn/cliente1.conf
tls-client client dev tun proto tcp remote 192.168.2.X 1194 redirect-gateway def1 ping 10 float resolv-retry infinite nobind persist-key persist-tun ca ca.crt cert cliente1.crt key cliente1.key #auth-user-pass pull reneg-sec 0 auth-nocache verb 5 #route-method exe #route-delay 2 comp-lzo