Hi !
I've been trying to do a port forwarding on my multiples VPN servers, but i can't make it work :/
My server.conf :
port 443
proto udp
dev tun
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
reneg-sec 0
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/dh1024.pem
plugin /etc/openvpn/radiusplugin.so /etc/openvpn/radiusplugin.cnf
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
client-config-dir /etc/openvpn/ccd
route 10.8.0.0 255.255.255.0
My client.conf :
client
dev tun
proto udp
remote xx.xx.xx.xx 443
resolv-retry infinite
nobind
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
persist-key
persist-tun
ca ca.crt
auth-user-pass
comp-lzo
reneg-sec 0
verb 3
I've put "client-config-dir /etc/openvpn/ccd" and "route 10.8.0.0 255.255.255.0" into my server.conf, and in my ccd folder i have a file name named "PanDoreS" which contains :
ifconfig-push 10.8.0.5 10.8.0.6
To redirect the port to my static ip i used this iptables rules :
iptables -t nat -A PREROUTING -p tcp -m tcp --dport 5689 -j DNAT --to-destination 10.8.0.5:5689
But all of this doesn't work :/ I can't connect to the port 5689 on my server, and i don't know if this is normal but on my SSH server terminal, i can't ping my static openvpn ip adress (maybe a subnet issue ?).
Do you guys know the problem on my configuration ? 🙂
Thanks by advance 😃 !