...
Variable | Description |
---|---|
context.vars.centralVPN | |
context.vars.remoteVPN |
Add-in code:
/** // centralVPN = Settings regarding and outgoint to Central Site Device // remoteVPN = Settings regarding and outgoint to Remote Site Device // Firewall Rule and Routing Table Entry on Central Site Device if (context.vars.centralVPN == "true" ) { config.infoLog( "central" ); addFirewallRule( "RuleName" , "%HremoteVPNPeer" , "%centralVPNNetworkName" , "ACCEPT" , "centralVPNNetworkRtgTag" ) addRoute( "remoteVPNNetwork" , "remoteVPNNetmask" , "0" , "0" , "remoteVPNPeer" , "4" , "0" , "0" , "Route for additional Central VPN Network to Remote VPN Peer" ) } // Firewall Rule and Routing Table Entry on Remote Site Device if (context.vars.remoteVPN == "true" ) { config.infoLog( "remote" ); addFirewallRule( "RuleName" , "%HcentralVPNPeer" , "%LremoteVPNNetworkName" , "ACCEPT" , "remoteVPNNetworkRtgTag" ) addRoute( "centralVPNNetwork" , "centralVPNNetmask" , "0" , "0" , "centralVPNPeer" , "4" , "0" , "0" , "Route for additional Central VPN Network" ) } }; config.infoLog("central"); addFirewallRule("RuleName", "%HremoteVPNPeer", "%centralVPNNetworkName", "ACCEPT", "centralVPNNetworkRtgTag") addRoute("remoteVPNNetwork", "remoteVPNNetmask", "0", "0", "remoteVPNPeer", "4", "0", "0", "Route for additional Central VPN Network to Remote VPN Peer") } // Firewall Rule and Routing Table Entry on Remote Site Device if (context.vars.remoteVPN == "true") { config.infoLog("remote"); addFirewallRule("RuleName", "%HcentralVPNPeer", "%LremoteVPNNetworkName", "ACCEPT", "remoteVPNNetworkRtgTag") addRoute("centralVPNNetwork", "centralVPNNetmask", "0", "0", "centralVPNPeer", "4", "0", "0", "Route for additional Central VPN Network") } }; |
---|
Add-in as JSON file:
View file | ||||||||
---|---|---|---|---|---|---|---|---|
|