Seiteneigenschaften |
---|
Description:
With this Add-in you can change the 1 to 1 VPN routing, to make additional private Networks reachable via the VPN connection.
...
The following example expects the centralVPN Device to have an additional network, that the remoteVPN Device wants to reach over the existing VPN-Connection in the untagged (VLAN 1) Network.
List of used variables:
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 | ||||||||
---|---|---|---|---|---|---|---|---|
|