Page 1 of 1

OpenVPN service running but not listening

Posted: Thu Apr 20, 2017 2:27 pm
by virinom
Hi,
I installed openvpn to my centos 6 x64 server.
Here is my server configuration

IDK why but oconf BB tag not working for me

[oconf=]port 1194 #- port
proto udp #- protocol
dev tun
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
reneg-sec 0
cipher AES-256-CBC
auth SHA-256
ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
cert /etc/openvpn/easy-rsa/2.0/keys/server.crt
key /etc/openvpn/easy-rsa/2.0/keys/server.key
dh /etc/openvpn/easy-rsa/2.0/keys/dh4096.pem
plugin /usr/lib64/openvpn/plugins/openvpn-plugin-auth-pam.so /etc/pam.d/login
client-cert-not-required
username-as-common-name
server 10.8.0.0 255.255.255.0
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
keepalive 5 30
comp-lzo
persist-key
persist-tun
status 1194.log
verb 3[/oconf]


Openvpn service is running but when i try to connect it from client i got openvpn connection reset by peer (wsaeconnreset) (code=10054)
I added these rules to iptables

Code: Select all

iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to-source MY_SERVER_IP
How can i fix this?
Thanks