Why udp port 53 traffic is captured?

Hi there,

I am using NEAppProxyProvider to filter a scope of port traffics. Am I am trying to capture all port traffic (except udp port 53) like below.

There are mainly two problems with below approach:
  1. Sometimes it works that can capture all traffic, but sometimes it cannot.

  2. All the time, udp 53 traffic is always captured in.

Is this a bug?


Code Block
private func buildRules(fullMode: Bool) -> [NENetworkRule] {
var hosts = [("", "")]
var rules: [NENetworkRule] = []
hosts = [("0.0.0.0", "0...52"),
("0.0.0.0", "54...65535"),]
for host in hosts {
let ep = NWHostEndpoint(hostname: host.0, port: host.1)
let rule = NENetworkRule.init(remoteNetwork: ep, remotePrefix: 0, localNetwork: nil, localPrefix: 0, protocol: .any, direction: .outbound)
rules.append(rule)
}
}
...
let settings = NETransparentProxyNetworkSettings.init(tunnelRemoteAddress: "127.0.0.1")
settings.includedNetworkRules = buildRules()
settings.excludedNetworkRules = nil
settings.dnsSettings = NEDNSSettings(servers: ["1.1.1.1", "1.0.0.1", "8.8.8.8", "8.8.4.4"])
setTunnelNetworkSettings(settings) { [unowned self] (error) in
...


Also, can you help indicate how to update in the tsi ticket? I would like to go on discussion fromTSI case 767665663, but don't know what is the link for it.

To continue the discussion on 767665663, simply reply on the thread. However, if your reply is outside the context of the original question, I will request that you open a new TSI.


Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
@meaton

I have noticed that the port defined in the rules as "0...52" and "54...65535". Is this range notation legal at all?

This is something on my to-do list to research. I've tested it and it does seem to work, but just because it works does not mean it is valid and thus why I have not called it out one way or the other. (Usually I would call it out right away.) I will keep this thread updated as I find out more.

Is there any update on this? (Please let me know if it is better to create a new thread).

Is there any update on this?

Not at this time, no.


Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com