SimpleFirewall sample application not working

I can build the SimpleFirewall application (https://developer.apple.com/documentation/networkextension/filtering_network_traffic ) using xcode: After I run the application, seems can't block any traffic.

I find there is some logs from network extension process:

networkd_settings_read_from_file Sandbox is preventing this process from reading networkd settings file at "/Library/Preferences/com.apple.networkd.plist", please add an exception.

Any step I am missing ?

Answered by DTS Engineer in 815374022

Most problems like this stem from a failure to adapt the sample for your own code signing environment. That is kinda tricky to do and, if something goes wrong, it’s hard to debug.

My advice is that you take a systematic approach to debugging the problem. I talk about this more in Debugging a Network Extension Provider.

Oh, and regarding this:

I find there is some logs from network extension process

that’s just log noise.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

It could just be how you are running the application and network system extension. When you build the application, are you able to move it to the application directory and then execute the container app? Have you also changed the bundle identifiers on the container app and the network system extension to be compatible with your developer account?

I'm facing the same problem. Were you able to fix it?

Most problems like this stem from a failure to adapt the sample for your own code signing environment. That is kinda tricky to do and, if something goes wrong, it’s hard to debug.

My advice is that you take a systematic approach to debugging the problem. I talk about this more in Debugging a Network Extension Provider.

Oh, and regarding this:

I find there is some logs from network extension process

that’s just log noise.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

SimpleFirewall sample application not working
 
 
Q