+ localAddress); } else { ipsecPeerConfigBuilder.setSourceInterface(externalInterface.getName()); ipsecPeerConfigBuilder.setLocalAddress(localAddress);
ipsecStaticConfigBuilder.setSourceInterface(ikeGateway.getExternalInterface().getName());
.setIkePhase1Policy(vpnId) .setIpsecPolicy(vpnId) .setSourceInterface(externalInterfaceName) .setLocalAddress(ipsecTunnel.getVgwOutsideAddress()) .setDestinationAddress(ipsecTunnel.getCgwOutsideAddress())
.setSourceInterface("interface1") .setTunnelInterface("Tunnel1") .build(); IpsecStaticPeerConfig ipsecPeerConfig2 = IpsecStaticPeerConfig.builder() .setSourceInterface("interface2") .setTunnelInterface("Tunnel2") .build(); IpsecStaticPeerConfig ipsecPeerConfig3 = IpsecStaticPeerConfig.builder() .setSourceInterface("interface3") .setTunnelInterface("Tunnel3") .build(); IpsecStaticPeerConfig ipsecPeerConfig4 = IpsecStaticPeerConfig.builder() .setSourceInterface("interface4") .setTunnelInterface("Tunnel4") .build(); IpsecStaticPeerConfig ipsecPeerConfig5 = IpsecStaticPeerConfig.builder().setSourceInterface("interface5").build(); IpsecStaticPeerConfig ipsecPeerConfig6 = IpsecStaticPeerConfig.builder().setSourceInterface("interface6").build(); IpsecStaticPeerConfig ipsecPeerConfig7 = IpsecStaticPeerConfig.builder() .setSourceInterface("interface7") .setTunnelInterface("Tunnel7") .build();
.setSourceInterface("int11") .setTunnelInterface("tunnel11") .build(); IpsecStaticPeerConfig peer2 = IpsecStaticPeerConfig.builder() .setSourceInterface("int12") .setTunnelInterface("tunnel12") .build(); IpsecStaticPeerConfig peer3 = IpsecStaticPeerConfig.builder() .setSourceInterface("int21") .setTunnelInterface("tunnel21") .build(); IpsecStaticPeerConfig peer4 = IpsecStaticPeerConfig.builder() .setSourceInterface("int22") .setTunnelInterface("tunnel22") .build();
Configuration responderNode; _ipsecStaticPeerConfigBuilder .setSourceInterface("Test_interface") .setLocalAddress(Ip.parse("1.2.3.4")) .setTunnelInterface("Tunnel_interface");
/** Converts a {@link Tunnel} to an {@link IpsecPeerConfig} */ static IpsecPeerConfig toIpsecPeerConfig( Tunnel tunnel, String tunnelIfaceName, CiscoConfiguration oldConfig, Configuration newConfig) { IpsecStaticPeerConfig.Builder ipsecStaticPeerConfigBuilder = IpsecStaticPeerConfig.builder() .setTunnelInterface(tunnelIfaceName) .setDestinationAddress(tunnel.getDestination()) .setLocalAddress(tunnel.getSourceAddress()) .setSourceInterface(tunnel.getSourceInterfaceName()) .setIpsecPolicy(tunnel.getIpsecProfileName()); IpsecProfile ipsecProfile = null; if (tunnel.getIpsecProfileName() != null) { ipsecProfile = oldConfig.getIpsecProfiles().get(tunnel.getIpsecProfileName()); } if (ipsecProfile != null && ipsecProfile.getIsakmpProfile() != null) { ipsecStaticPeerConfigBuilder.setIkePhase1Policy(ipsecProfile.getIsakmpProfile()); } else { ipsecStaticPeerConfigBuilder.setIkePhase1Policy( getIkePhase1Policy( newConfig.getIkePhase1Policies(), tunnel.getDestination(), tunnel.getSourceInterfaceName())); } return ipsecStaticPeerConfigBuilder.build(); }