What's new

Asus Merlin Router / OpenVPN client / Port forwards how?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

cw-kid

Regular Contributor
Hello

I am struggling to setup a port forward to my IP security camera, so I can view it in TinyCam Pro app on my phone when out the house etc.

I have a Torguard Open VPN client running on my router and everything is behind that VPN tunnel.

I don't know how to do NAT where the external port number is different to the actual internal port number ?

For example I wanted the external port to be 8098 and the camera's internal port for the rtsp stream is 554.

I am using a nat-start file and I tried adding this and rebooting the router, but I still cannot connect to the camera.

iptables -I FORWARD 8 -i tun11 -p tcp -d 192.168.1.14 --dport 8098 -j ACCEPT
iptables -t nat -I PREROUTING 8 -i tun11 -p tcp --dport 554 -j DNAT --to-destination 192.168.1.14

192.168.1.14 being the IP camera.

I also on the Torguard client area in Port Management added tcp:8098.

However on a port checker site like this one, it says port 8098 is closed for some reason.

I have used the nat-start file before for my Emby Media Server and that works fine, however the difference there, is that the external port number and the internal port number are the same.

Any tips?

Thanks
 
iptables -I FORWARD 8 -i tun11 -p tcp -d 192.168.1.14 --dport 8098 -j ACCEPT
iptables -t nat -I PREROUTING 8 -i tun11 -p tcp --dport 554 -j DNAT --to-destination 192.168.1.14

This is the answer and its now working.

iptables -I FORWARD 8 -i tun11 -p tcp -d 192.168.1.14 --dport 8098 -j ACCEPT
iptables -t nat -I PREROUTING 8 -i tun11 -p tcp --dport 8098 -j DNAT --to-destination 192.168.1.14:554
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top