Post

Replies

Boosts

Views

Activity

Reply to [macOS] Wanted to capture inbound DNS traffic using NETransparentProxyProvider
Hi @eskimo, Sorry for the confusion; I was referring specifically to the flow. I attempted the settings below in order to receive incoming flow. NENetworkRule *dnsInboundTraffic = [[NENetworkRule alloc] initWithRemoteNetwork:nil remotePrefix:0 localNetwork:[NWHostEndpoint endpointWithHostname:@"0.0.0.0" port:@"12345"] localPrefix:0 protocol:NENetworkRuleProtocolTCP direction:NETrafficDirectionInbound]; settings.includedNetworkRules = @[dnsInboundTraffic]; But I'm not receiving incoming flow; it is functioning correctly for outgoing flow. Please correct me if I'm doing anything wrong while creating the NENetworkRule.
Feb ’24
Reply to [macOS] Wanted to capture inbound DNS traffic using NETransparentProxyProvider
Hi @eskimo, We have tried the code provided above and we have observed outgoing packets on port 12345, but there are no incoming packets. NSArray<NENetworkRule *> *includedNetworks = @[ @[@"0.0.0.0", @0], @[@"::", @0] ]; NSMutableArray<NENetworkRule *> *networkRules = [NSMutableArray array]; for (NSArray *network in includedNetworks) { NSString *addr = network[0]; NSNumber *prefix = network[1]; NWHostEndpoint *endpoint = [NWHostEndpoint endpointWithHostname:addr port:@"12345"]; NENetworkRule *networkRule = [[NENetworkRule alloc] initWithDestinationNetwork:endpoint prefix:prefix.intValue protocol:NENetworkRuleProtocolTCP]; [networkRules addObject:networkRule]; } settings.includedNetworkRules = networkRules;
Feb ’24
Reply to [macOS] Encountering DNS cache issues while using NETransparentProxyProvider.
@meaton, thanks for the reply, Is there a way to remove DNS cache? I tried sudo killall -HUP mDNSResponder, but it only removed the system DNS cache. There is also the browser cache (Chrome) that remains unaffected, and it will persist until its TTL expires. When we switch off the WIFI and then enable it again, all DNS caches, including the browser cache (Chrome), are cleared. Is there anything else we can try to remove the DNS cache?
Feb ’24