What's new

Domain-based VPN Routing Script

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

@Ranger802004 thanks for sharing this. It is a great script and work flawlessly. Any plan to integrate this into amtm?
I have to work on getting the UI set up for my other script WAN Failover which has been requested to be integrated into amtm but need that prereq first. I haven't received enough attention on this one yet I think.
 
I have to work on getting the UI set up for my other script WAN Failover which has been requested to be integrated into amtm but need that prereq first. I haven't received enough attention on this one yet I think.
You have my undivided attention ;)
 
anyone tried this on 388 firmware?
i get errors when creating a policy using 1.4beta. Also wan interfaces are not chooseable.
(i did a clean install, never had a pevious version installed)

1668716207908.png
 
anyone tried this on 388 firmware?
i get errors when creating a policy using 1.4beta. Also wan interfaces are not chooseable.
(i did a clean install, never had a pevious version installed)

View attachment 45567

I'd recommend upgrading to the latest beta instead of the alpha build you are on and test. I am running 388.1-beta2 on a GT-AX11000 and they are displaying for me.
1668723836312.png
 
Hello Ranger, good script. Running script on firmware 388.1 on a GT-AX11000 and official script working fine. Having upgraded to v1.4-beta1 Release of Script, I too do not see WAN interface at all. Same results as @homasholz . Any advice to see WAN0 interface?

Side note: Language is a little confusing. Is it v1.4-beta1 or v1.4-beta1a? I've tried beta1a and it doesn't do nothing anyway.

Thank you again.
 
Hello Ranger, good script. Running script on firmware 388.1 on a GT-AX11000 and official script working fine. Having upgraded to v1.4-beta1 Release of Script, I too do not see WAN interface at all. Same results as @homasholz . Any advice to see WAN0 interface?

Side note: Language is a little confusing. Is it v1.4-beta1 or v1.4-beta1a? I've tried beta1a and it doesn't do nothing anyway.

Thank you again.
Sorry for the delay guys, I’ve been out of country and will begin fixing this in the next few days after Christmas. I have already identified the issue just need to update the code and publish.
 
v1.4-beta1c Release: To use the beta use the following command to replace your production version of the script.
Code:
/usr/sbin/curl -s "https://raw.githubusercontent.com/Ranger802004/asusmerlin/main/domain_vpn_routing/domain_vpn_routing_v1.4-beta1.sh" -o "/jffs/scripts/domain_vpn_routing.sh" && chmod 755 /jffs/scripts/domain_vpn_routing.sh

To revert back to production release:
Code:
/jffs/scripts/domain_vpn_routing.sh update

Release Notes:
v1.4-beta1c
Enhancements:
- General optimization
- Added the ability to select WAN0 or WAN1 interfaces for a policy
- Added Alias as domain_vpn_routing (For initial load on terminals open during upgrade, execute ". /jffs/configs/profile.add" to load new alias)

Fixes:
- Corrected issue where WAN Interface wouldn't show up if not using Dual WAN Mode
 
Perfect. This now completes my complicated network setup. For those who are curious:

Server machine sits outside of VPN - all traffic is wan0 with the exception of domains using this script go through VPN. I want certain services running and their respective connections to travel through VPN irrespective. Check!

Server machine has caddy reverse proxy and 5 services running. Router port forward myexample.com 443/80 to caddy and caddy does the rest. Check!.

All other devices route through vpn via vpn director. Check!

Certain sites that don't play well through VPN, now route through Wan0 for ALL devices. Example, banking sites, amazon prime, netflix etc. Check!

Cherry on top.... added myexample.com to /jffs/configs/dnsmasq.conf.add have hairpin NAT (or using my owndomain name to route internally)
address=/myexample.com/internalserverip. Check!

I did a traceroute to confirm domain names are routing via eht0 or tun11 and this script is working as expected. Well done!!!! and thanks a ton! Check!
 
I haven't received enough attention on this one yet I think.
This is exactly what I was looking for. I also vastly prefer to not have to login to the console every time I want to make any router changes, lol, would LOVE if there were a GUI for this. Has @Jack Yaz seen this yet? He's the resident (beloved ;) ) GUI arteest. (I didn't read through all 8 pages)
 

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