I have running OpenVPN on my VPS which have static ip address. OpenVPN works as expected but I am not able to forward ports to OpenVPN client. I have tried few iptables rules but no luck. These are the iptables rules which I used, what can be the problem?
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 9292 -j DNAT --to-destination 10.8.0.2 iptables -t filter -A INPUT -p tcp -d 10.8.0.2 --dport 9292 -j ACCEPT iptables -A FORWARD -i eth0 -p tcp --dport 9292 -d 10.8.0.2 -j ACCEPT
10.8.0.2 is OpenVPN client ip and eth0 is VPS external - internet facing ip. I am behind NAT in VPS, my internal ip address is 10.164.0.3, am I suppose to forward ports to internal ip address from external ip address in VPS first?