VPN Director API or script

JVC

New Around Here
Is there a programmatic method (terminal) for changing the VPN Director configuration? For instance, changing a specific Local IP (Device) to use a specific Interface (WAN, OVPNx)?

Ultimately, what I would like to do is wrap these scripts into a RESTful interface that I can integrate with home automation. i.e. have a button that has an AppleTV on WAN or various OPVN connections.
 

ColinTaylor

Part of the Furniture
You'd have to do it through an SSH terminal session by modifying the /jffs/openvpn/vpndirector_rulelist file and restarting the VPN services.

The firmware doesn't have a RESTful interface.
 
Last edited:

Ranger802004

Very Senior Member
@ColinTaylor can you please advise where I can find more info on vpndirector_rulelist file?
Create a VPN Director rule or 2, look at the syntax in the policy file it creates where @ColinTaylor. Once you have that you can build a script around inserting or deleting those rules using the syntax.
 

ColinTaylor

Part of the Furniture
@ColinTaylor can you please advise where I can find more info on vpndirector_rulelist file?
I don't believe it's documented anywhere, you'd have to look at the source code.

But as the previous post said, if you experiment with some rules it should be fairly obvious.
@Ranger802004 what I'm interested in is if I can add more than one network in the "Remote IP" field with a comma... or semicolon?
No, I don't believe so. You'd have to make multiple rules.
 
Last edited:

Ranger802004

Very Senior Member
@Ranger802004 what I'm interested in is if I can add more than one network in the "Remote IP" field with a comma... or semicolon?
Negative, you'd have to make multiple rules for difference Destination Subnets, what are you trying to do exactly?
 

Ranger802004

Very Senior Member

eibgrad

Part of the Furniture
If it's any help, my killswitch script at least reads the VPN Director rules (but doesn't update them). That portion of the script might be useful as a starting point for both operations.

 

Similar threads

Sign Up For SNBForums Daily Digest

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