I need to forward port 44444 of my VPN client to the public internet with my public IP on port 44444, how i can do this?
The VPN Server is mine and I have root access.
Example how i can do this? WANIP:44444-> 172.27.224.2:44444 (VPN LOCAL IP) ?
I'm trying with this but no success:
sysctl net.ipv4.ip_forward=1
iptables -t nat -A PREROUTING -d WANIP -p tcp --dport 44444 -j DNAT --to-destination 172.27.224.2:44444
iptables -t nat -A POSTROUTING -d 172.27.224.2 -p tcp --dport 44444 -j SNAT --to-source WANIPInterface of WAN IP is eth0 and Interface of VPN LOCAL IP is as0t0
2 Reset to default