OpenVPN and router NAT (port forwarding)

Business solution to host your own OpenVPN server with web management interface and bundled clients.
Post Reply
viper25
OpenVpn Newbie
Posts: 2
Joined: Fri Oct 23, 2015 1:03 am

OpenVPN and router NAT (port forwarding)

Post by viper25 » Fri Oct 23, 2015 1:16 am

I've setup a OpenVPN server on a Ubuntu Server per https://help.ubuntu.com/lts/serverguide/openvpn.html I am able to connect from within my home and from Outside. I've setup port forwarding for the standard port 1194 on my router and my *.ovpn file has the entry:

Code: Select all

 remote myserver.myhostcom 1194
However if I edit both places (my router port forwarding and the *.ovpn file) to use another port, say 6030, it fails to connect. In the router I've set port forwarding to forward 6030 to 1194 port on my Ubuntu OpenVPN server. This doesn't seem to work.

So doesn't OpenVPN work in this scenario (port forward on router)? I've searched forum but couldn't see a similar question.

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: OpenVPN and router NAT (port forwarding)

Post by Traffic » Mon Oct 26, 2015 11:32 am

OpenVPN supports practically any port you like (there may be some restrictions from other sources).

viper25
OpenVpn Newbie
Posts: 2
Joined: Fri Oct 23, 2015 1:03 am

Re: OpenVPN and router NAT (port forwarding)

Post by viper25 » Thu Oct 29, 2015 2:25 am

Traffic wrote:OpenVPN supports practically any port you like (there may be some restrictions from other sources).
Yes, but using a port other than 1194 for external access doesn't seem to work. Port forwarding only works if it forward from 1194 --> 1194. Doesn't work for say 6030 --> 1194

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: OpenVPN and router NAT (port forwarding)

Post by Traffic » Mon Nov 23, 2015 9:58 pm

It works for me .. check your router manual.

Post Reply