Skip to main content
Question

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

  • March 4, 2021
  • 3 replies
  • 27 views

Forum|alt.badge.img+10

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

Thanks

3 replies

skeenan07
Forum|alt.badge.img+10
  • Contributor
  • March 4, 2021

The following command will turn off the firewall:

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

Forum|alt.badge.img+10
  • Author
  • Valued Contributor
  • March 4, 2021

@skeenan07 something like this?

!/bin/sh

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


skeenan07
Forum|alt.badge.img+10
  • Contributor
  • March 4, 2021

@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