Hello guys, im trying to make the NEFilterDataProvider work but i just cant seem to do so. Basically what i want to do is recieve all flows (in/out) in the handleNewFlow function.
What i intend to do there is drop all inbound flows but before doing that i want to log them. Also i want to allow all outgoing flows and also log them.
I understand that this rule alone should be able to acomplish what i want but for some reason im not receiving outbound traffic. Is there an explanation to this?
I think its weird because when i change the
to drop, i loose access to the internet so that means the outbound flows are not matching with the rule i showed you earlier. Why is that?
Thanks in advance
What i intend to do there is drop all inbound flows but before doing that i want to log them. Also i want to allow all outgoing flows and also log them.
Code Block let anyHostAndPortRule = NENetworkRule( remoteNetwork: nil, remotePrefix: 0, localNetwork: nil, localPrefix: 0, protocol: .any, direction: .any ) filterRules = [NEFilterRule(networkRule: anyHostAndPortRule, action: .filterData)] let filterSettings = NEFilterSettings(rules: rules, defaultAction: .allow)
I understand that this rule alone should be able to acomplish what i want but for some reason im not receiving outbound traffic. Is there an explanation to this?
I think its weird because when i change the
Code Block defaultAction: .drop
to drop, i loose access to the internet so that means the outbound flows are not matching with the rule i showed you earlier. Why is that?
Thanks in advance