What's new

Route only specific ports and hosts via VPN. All other traffic via WAN. (Asuswrt-Merlin)

  • 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!

kevinkey619

New Around Here
I'm currently using portmap.io so that I can have a static IP address over Starlink and access the RTSP streams of my IP cameras. So, I have it set up as a VPN in Asuswrt-Merlin. I'd like to route only traffic on port 554 via the VPN and the rest of the traffic via the WAN (bypassing the VPN). The reason for this is that if I route all the traffic on the camera via the VPN, it breaks the ability for the camera to synch with the time server and other functions.

I found out about https://github.com/RMerl/asuswrt-merlin.ng/wiki/Policy-based-Port-routing-(manual-method) , but I'm not sure how to make it work.

Here's my current /jffs/scripts/nat-start


Code:
#!/bin/sh


sleep 10  # During the boot process nat-start may run multiple times so this is required

iptables -t nat -I PREROUTING -i tun11 -p tcp --dport 554 -j DNAT --to-destination 10.0.1.118


exit 0

And in the GUI:
1677617436442.png


I just want Port 554 routed via the VPN, however.

Is that possible?
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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