User Tools

Site Tools


ubuntu_openvpn

OpenVPN

Server

openvpn.conf
port 1194
proto udp
dev ovpn-server-udp
dev-type tun
ca ca.crt
cert devps.crt
key devps.key  # This file should be kept secret
dh dh1024.pem
topology subnet
client-to-client
server 10.2.1.0 255.255.255.0
ifconfig-pool-persist ipp-udp.txt 0
push "redirect-gateway def1" #no gw
push "dhcp-option DNS 8.8.8.8"
keepalive 10 120
tls-auth ta.key 0 # This file is secret
key-direction 0
cipher AES-128-CBC   # AES
auth SHA256
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
ipp-udp.txt
client1,10.0.0.101
client2,10.0.0.102
ccd/client1
iroute 192.168.1.1 255.255.255.0 #subnet behind this client

Client

client
dev tun
;proto tcp
proto udp
remote xx.xx.xx.xx # server address
;remote-random # round-robin among multiple servers
resolv-retry infinite
nobind
user nobody
group nogroup
persist-key
persist-tun
remote-cert-tls server
;tls-auth ta.key 1
pull
cipher AES-128-CBC
auth SHA256
key-direction 1
comp-lzo
verb 3
;mute 20
block-outside-dns # prevent dns leak
ubuntu_openvpn.txt · Last modified: 2018/10/19 13:02 by admin