#1 2016-06-10 15:49:32

Trusted Member
Registered: 2016-06-08
Posts: 4

Port Forwarding to OpenVPN Clients on NATed VPS

On my servers with dedicated IPs where I run OpenVPN, I use the following iptables rules to forward ports to OpenVPN clients:

iptables -A PREROUTING -t nat -i venet0 -p tcp --dport 1234:1239 -j DNAT --to

iptables -A FORWARD -p tcp -d --dport 1234:1239 -j ACCEPT

These same rules do not seem to work on my NATed VPS though.  I realize I am confined to 20 predefined ports based on my IP address.  Perhaps this is related to the fact that double NATing is occurring?  I'm using Nyr's road warrior installer.


Board footer