Hi
I am building NETransparentProxyProvider proxy. Observing a problem with L2TP over IPsec VPN. As soon as the following UDP filter is set. L2TP over IPSec VPN is disconnected after some time.
includeRule = [[NENetworkRule alloc] initWithRemoteNetwork:nil
remotePrefix:0
localNetwork:nil
localPrefix:0
protocol:NENetworkRuleProtocolUDP
direction:NETrafficDirectionOutbound];
In this case, Wireshark capture shows only outgoing packets on the ppp0 interface.
I also set up exception rules:
- 500/4500 UDP ports bypass.
NSString *ipAddress = [NSString stringWithUTF8String:"0.0.0.0"];
NSString *portNum = [NSString stringWithUTF8String: "500"];
NWHostEndpoint *endpoint = [NWHostEndpoint endpointWithHostname:ipAddress port:portNum];
NENetworkRule *rule = [[NENetworkRule alloc]
initWithDestinationNetwork:endpoint
prefix:0 protocol:NENetworkRuleProtocolAny];
[excludeRules addObject:rule];
ipAddress = [NSString stringWithUTF8String:"0.0.0.0"];
portNum = [NSString stringWithUTF8String: "4500"];
endpoint = [NWHostEndpoint endpointWithHostname:ipAddress port:portNum];
rule = [[NENetworkRule alloc]
initWithDestinationNetwork:endpoint
prefix:0 protocol:NENetworkRuleProtocolAny];
[excludeRules addObject:rule];
- Always returning NO in handleNewUDPFlow
initialRemoteEndpoint:(NWEndpoint *)remoteEndpoint {
return NO;
}
Both options did not resolve the issue.
Please let give me some pointers to resolve it.
I am running 11.3.1