Script to turn firewall off on end user to VNC into laptop

EliasG
Contributor

Anyone have a script to turn off end user firewall settings so we can VNC into laptop for assistance?

Thanks

3 REPLIES 3

skeenan07
New Contributor III

The following command will turn off the firewall:

/usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate off

EliasG
Contributor

@skeenan07 something like this?

!/bin/sh

/usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate off

skeenan07
New Contributor III

@EliasG Yep. You could add this command as well to unblock all incoming connections, but I don't think it would be necessary if you're completely turning off the firewall.

/usr/libexec/ApplicationFirewall/socketfilterfw --setblockall off