Skip to content

Instantly share code, notes, and snippets.

@bubenkoff
Last active October 13, 2025 08:30
Show Gist options
  • Select an option

  • Save bubenkoff/4043130 to your computer and use it in GitHub Desktop.

Select an option

Save bubenkoff/4043130 to your computer and use it in GitHub Desktop.

Revisions

  1. bubenkoff revised this gist Jan 3, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion checkpoint.sh
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,7 @@ then
    # $SERVICE is running. Shut it down
    [ -f /Library/LaunchDaemons/com.checkpoint.epc.service.plist ] && sudo launchctl unload /Library/LaunchDaemons/com.checkpoint.epc.service.plist
    [ -d /Library/Extensions/cpfw.kext ] && sudo kextunload /Library/Extensions/cpfw.kext
    [ -d '/Applications/Check Point Firewall.app'] && open -W -n -a '/Applications/Check Point Firewall.app' --args --disable
    [ -d '/Applications/Check Point Firewall.app' ] && open -W -n -a '/Applications/Check Point Firewall.app' --args --disable
    killall $SERVICE
    else
    # $SERVICE is not running. Fire it up
  2. bubenkoff revised this gist Nov 26, 2020. 1 changed file with 8 additions and 6 deletions.
    14 changes: 8 additions & 6 deletions checkpoint.sh
    Original file line number Diff line number Diff line change
    @@ -20,12 +20,14 @@ SERVICE='Endpoint_Security_VPN'
    if pgrep $SERVICE > /dev/null
    then
    # $SERVICE is running. Shut it down
    sudo launchctl unload /Library/LaunchDaemons/com.checkpoint.epc.service.plist
    sudo kextunload /Library/Extensions/cpfw.kext
    [ -f /Library/LaunchDaemons/com.checkpoint.epc.service.plist ] && sudo launchctl unload /Library/LaunchDaemons/com.checkpoint.epc.service.plist
    [ -d /Library/Extensions/cpfw.kext ] && sudo kextunload /Library/Extensions/cpfw.kext
    [ -d '/Applications/Check Point Firewall.app'] && open -W -n -a '/Applications/Check Point Firewall.app' --args --disable
    killall $SERVICE
    else
    # $SERVICE is not running. Fire it up
    sudo launchctl load /Library/LaunchDaemons/com.checkpoint.epc.service.plist
    sudo kextload /Library/Extensions/cpfw.kext
    open '/Applications/Endpoint Security VPN.app'
    fi
    [ -f /Library/LaunchDaemons/com.checkpoint.epc.service.plist ] && sudo launchctl load /Library/LaunchDaemons/com.checkpoint.epc.service.plist
    [ -d /Library/Extensions/cpfw.kext ] && sudo kextload /Library/Extensions/cpfw.kext
    [ -d '/Applications/Check Point Firewall.app' ] && open -W -n -a '/Applications/Check Point Firewall.app' --args --enable
    [ -d '/Applications/Endpoint Security VPN.app' ] && open '/Applications/Endpoint Security VPN.app'
    fi
  3. bubenkoff revised this gist Apr 30, 2020. 1 changed file with 21 additions and 10 deletions.
    31 changes: 21 additions & 10 deletions checkpoint.sh
    Original file line number Diff line number Diff line change
    @@ -3,18 +3,29 @@
    # The reason of creating this script is that Endpoint Security VPN installs it's own application firewall kext cpfw.kext
    # which prevents for example PPTP connections from this computer, which is not appropriate if you need subj connection just
    # from time to time
    # Usage: checkpoint.sh load|unload
    #
    # Usage: ./checkpoint.sh
    #
    # The script checks if Enpoint Security VPN is running. If it is, then it shuts it down, if it is not, it fires it up.
    # Or, make an Automator action and paste the script.
    # You will need sudo power, of course
    #
    # To prevent Endpoint Security VPN from starting automatically whenever you restart your Mac, edit this file:
    # `/Library/LaunchAgents/com.checkpoint.eps.gui.plist`
    # And change the values of `RunAtLoad` and `KeepAlive` to `false`
    # [Source](https://superuser.com/questions/885273)

    SERVICE='Endpoint_Security_VPN'

    if [ $1 == "unload" ]
    if pgrep $SERVICE > /dev/null
    then
    killall Endpoint_Security_VPN
    killall TrGui
    killall TrGUI;
    fi
    sudo launchctl $1 /Library/LaunchDaemons/com.checkpoint.epc.service.plist && sudo kext$1 sudo kext$1 /System/Library/Extensions/cpfw.kext
    if [ $1 == 'load' ]
    then
    /Applications/Endpoint\ Security\ VPN.app/Contents/MacOS/Endpoint_Security_VPN 2>1 > /dev/null &
    # $SERVICE is running. Shut it down
    sudo launchctl unload /Library/LaunchDaemons/com.checkpoint.epc.service.plist
    sudo kextunload /Library/Extensions/cpfw.kext
    killall $SERVICE
    else
    # $SERVICE is not running. Fire it up
    sudo launchctl load /Library/LaunchDaemons/com.checkpoint.epc.service.plist
    sudo kextload /Library/Extensions/cpfw.kext
    open '/Applications/Endpoint Security VPN.app'
    fi
  4. bubenkoff revised this gist Apr 30, 2020. No changes.
  5. bubenkoff revised this gist Apr 30, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion checkpoint.sh
    Original file line number Diff line number Diff line change
    @@ -13,7 +13,7 @@ then
    killall TrGui
    killall TrGUI;
    fi
    sudo launchctl $1 /Library/LaunchDaemons/com.checkpoint.epc.service.plist && sudo kext$1 /System/Library/Extensions/cpfw.kext
    sudo launchctl $1 /Library/LaunchDaemons/com.checkpoint.epc.service.plist && sudo kext$1 sudo kext$1 /System/Library/Extensions/cpfw.kext
    if [ $1 == 'load' ]
    then
    /Applications/Endpoint\ Security\ VPN.app/Contents/MacOS/Endpoint_Security_VPN 2>1 > /dev/null &
  6. bubenkoff created this gist Nov 9, 2012.
    20 changes: 20 additions & 0 deletions checkpoint.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    #!/bin/bash
    #
    # The reason of creating this script is that Endpoint Security VPN installs it's own application firewall kext cpfw.kext
    # which prevents for example PPTP connections from this computer, which is not appropriate if you need subj connection just
    # from time to time
    # Usage: checkpoint.sh load|unload
    # You will need sudo power, of course
    #

    if [ $1 == "unload" ]
    then
    killall Endpoint_Security_VPN
    killall TrGui
    killall TrGUI;
    fi
    sudo launchctl $1 /Library/LaunchDaemons/com.checkpoint.epc.service.plist && sudo kext$1 /System/Library/Extensions/cpfw.kext
    if [ $1 == 'load' ]
    then
    /Applications/Endpoint\ Security\ VPN.app/Contents/MacOS/Endpoint_Security_VPN 2>1 > /dev/null &
    fi