Skip to main content

Remove IP Address from cPHulk Whitelist via cli/terminal?

Comments

8 comments

  • cPRex Jurassic Moderator
    Hey there! There is an equivalent blacklist command at /usr/local/cpanel/scripts/cphulkdblacklist that you can run. If you run the blacklist command on an IP already in the whitelist, it does remove the IP from the whitelist as well.
    0
  • cPRex Jurassic Moderator
    I don't see an equivalent command to just remove the IP from either list. Is that something you'd like to see us create?
    0
  • eggybot21
    I'm looking for this command due to I want to be able to remove the IP address added by Github for the firewall. My Github actions send current IP address to the database and added the ip address in whitelist via shell command. Currently, my cphulk blocks all Countries which is why I'm adding it on the whitelist. But Github has tons of IP addresses use in Github actions and currently, I want to remove the IP address once the action process is completed. If you can add it on the future release for cphulk then that is good, but for now I will remove it manually via whm panel. Also, I cannot added on the blacklist command due to I'm using it for Github actions. Thanks,
    0
  • cPRex Jurassic Moderator
    I went ahead and created this feature request and I'll bring it up with the team next week:
    0
  • phil99
    If I'm not mistaken, you can use the whmapi for this: whmapi1 delete_cphulk_record list_name="white" ip="1.2.3.4"
    0
  • cPRex Jurassic Moderator
    @phil99 - good find! I wasn't aware of that API call.
    0
  • eggybot21
    Thanks for the answer, will try it today and will let you know.
    0
  • eggybot21
    sorry for the late reply, the command line for removing the cphulk IP address in Whitelist are properly working. Thanks again
    0

Please sign in to leave a comment.