Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Apps and Programs
How to block applications from accessing the internet?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="thatotherguy" data-source="post: 815897" data-attributes="member: 90849"><p>You can use sandbox-exec to block an application from accessing the net. </p><p></p><p>First create a sandbox profile that blocks net access. This is just a file which will contain something like</p><p></p><p>[code]</p><p>(version 1)</p><p>(allow default)</p><p>(block network*)</p><p>[/code]</p><p></p><p>If you look in /usr/share/sandbox there are some profiles you can look at if you want to figure out anything fancier.</p><p></p><p>Then you run the application using sandbox-exec and passing in the profile you just created i.e </p><p>[code]</p><p>sandbox-exec -f nonet.sb application-binary</p><p>[/code]</p><p>Where nonet.sb is the name of the file you created above and application-binary is the path to the executable you want to run (If the app is in an app bundle you'll have to hunt out the actual binary in the bundles MacOS directory).</p></blockquote><p></p>
[QUOTE="thatotherguy, post: 815897, member: 90849"] You can use sandbox-exec to block an application from accessing the net. First create a sandbox profile that blocks net access. This is just a file which will contain something like [code] (version 1) (allow default) (block network*) [/code] If you look in /usr/share/sandbox there are some profiles you can look at if you want to figure out anything fancier. Then you run the application using sandbox-exec and passing in the profile you just created i.e [code] sandbox-exec -f nonet.sb application-binary [/code] Where nonet.sb is the name of the file you created above and application-binary is the path to the executable you want to run (If the app is in an app bundle you'll have to hunt out the actual binary in the bundles MacOS directory). [/QUOTE]
Verification
Name this item. 🍎
Post reply
Forums
Apple Computing Products:
macOS - Apps and Programs
How to block applications from accessing the internet?
Top