Skip to content

Custom rule for vpn connection #1

Answered by shvchk
hhai93 asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry, I somehow missed this question.

You need to know IP address(es) or range(s) to exclude. You can find it using nslookup or on website help / support section. Then you edit /etc/storage/post_iptables_script.sh either via SSH or in your router UI: CustomizationScriptsRun After Firewall Rules Restarted. You add a tiny utility function:

direct() {
  ip rule del to $1
  ip rule add to $1 lookup main pref 30
}

and can then add exclusions for IP: direct 123.45.67.89; or range (in CIDR notation): direct 98.76.54.32/24

Save changes with mtd_storage.sh save in case you used SSH.

For large services like Netflix finding IP ranges might be non trivial, since they can use lots of addresses …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by shvchk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants