What's new

VPN Director enable/disable rules from iPhone shortcut

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

pgershon

Regular Contributor
It is possible to create a shortcut for your iPhone to turn on and off the VPN by running scripts over ssh. But is there a way to change the VPN Director Rules file to enable or disable individual rules? I see the config file in /jffs/openvpn/vpndirector_rulelist, but I do not have the coding skills to craft a script to change specific text within a file. And then I am not sure if just updating this file is sufficient, or if something else needs to be done to "activate" the changes.

To be most clear, here is the content of the file on my system. <1> means enabled and <0> means disabled. I would want my script to toggle the <0> and <1> for select entries (CRs inserted by me for illustrative clarity):

<1>Bedroom LG>192.168.1.51>>OVPN1
<0>Apple TV Bedroom>192.168.1.21>>OVPN1
<0>Apple TV TV Room Wireless>192.168.1.25>>OVPN1
<1>Samsung>192.168.1.63>>OVPN1
<1>PG Laptop>192.168.1.106>>OVPN1
<0>Apple TV Living Room>192.168.1.27>>OVPN1
<0>perry ipad>192.168.1.101>>OVPN1
 
It is possible to create a shortcut for your iPhone to turn on and off the VPN by running scripts over ssh. But is there a way to change the VPN Director Rules file to enable or disable individual rules? I see the config file in /jffs/openvpn/vpndirector_rulelist, but I do not have the coding skills to craft a script to change specific text within a file. And then I am not sure if just updating this file is sufficient, or if something else needs to be done to "activate" the changes.

To be most clear, here is the content of the file on my system. <1> means enabled and <0> means disabled. I would want my script to toggle the <0> and <1> for select entries (CRs inserted by me for illustrative clarity):

<1>Bedroom LG>192.168.1.51>>OVPN1
<0>Apple TV Bedroom>192.168.1.21>>OVPN1
<0>Apple TV TV Room Wireless>192.168.1.25>>OVPN1
<1>Samsung>192.168.1.63>>OVPN1
<1>PG Laptop>192.168.1.106>>OVPN1
<0>Apple TV Living Room>192.168.1.27>>OVPN1
<0>perry ipad>192.168.1.101>>OVPN1
Just for sake of understanding... why not just leave them enabled at all times? It this is a deal-breaker, instead of getting too complex with scripts, have you looked at just assigning these to a parental controls group, and blocking/allowing that way?
 
Each Apple TV has apps that "need" the VPN for my use (MLB for example) and apps that I am afraid will reject it (YouTubeTV for example). I may want to watch a baseball game in one room, and then my wife may want to watch YouTubeTV on that same set 30 minutes later. MLB blacks out teams in their home market, so the VPN allows me to watch NY teams even when I am physically in NY. But YouTubeTV needs to see me in my proper market to make proper channels available and not trigger anti-VPN blocks.

How might a parent control group work? Would this allow me to effectively turn on or off the VPN by IP address?

Another thought I had was creating a secondary group of IP addresses for each Apple TV so it could connect to network with or without VPN depending on its IP address in use. But swapping IP addresses is not so easy on an Apple TV - easy for me, impossible for my wife.

PS-FWIW the advantage of accessing baseball through the VPN is not only getting around local blackouts, but the MLB app is virtually instantaneous live action, while the local cable company's feed of the local game on fiber is about 20-30 seconds behind the MLB.TV feed. Not good for live sports.
 
Each Apple TV has apps that "need" the VPN for my use (MLB for example) and apps that I am afraid will reject it (YouTubeTV for example). I may want to watch a baseball game in one room, and then my wife may want to watch YouTubeTV on that same set 30 minutes later. MLB blacks out teams in their home market, so the VPN allows me to watch NY teams even when I am physically in NY. But YouTubeTV needs to see me in my proper market to make proper channels available and not trigger anti-VPN blocks.

How might a parent control group work? Would this allow me to effectively turn on or off the VPN by IP address?

Another thought I had was creating a secondary group of IP addresses for each Apple TV so it could connect to network with or without VPN depending on its IP address in use. But swapping IP addresses is not so easy on an Apple TV - easy for me, impossible for my wife.

PS-FWIW the advantage of accessing baseball through the VPN is not only getting around local blackouts, but the MLB app is virtually instantaneous live action, while the local cable company's feed of the local game on fiber is about 20-30 seconds behind the MLB.TV feed. Not good for live sports.
Ok. Sorry, yeah, I don't think the parental controls option will work for you in this more complex situation.
 

Similar threads

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