Created
August 22, 2022 08:49
-
-
Save amanaplan/043a7b8731a6b3292bccc1699fbdc6b7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## 98-vlan8_to_wan2.sh | |
## A script to add policy-based routing to send VLAN8 to WAN2 on the UDM-Pro | |
## Includes monitoring to re-add rules in the event of config changes | |
vlan8_to_wan2_monitor() { | |
(while :; do | |
ip rule show | grep 32400 &> /dev/null || | |
(ip rule add pref 32400 from all iif br8 lookup 202) | |
sleep 1 | |
done) & | |
} | |
vlan8_to_wan2_monitor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment