Server IP : 195.201.23.43 / Your IP : 18.191.165.252 Web Server : Apache System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64 User : kdecoratie ( 1041) PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /etc/fail2ban/action.d/ |
Upload File : |
# Fail2ban Citrix Netscaler Action # by Juliano Jeziorny # juliano@jeziorny.eu # # The script will add offender IPs to a dataset on netscaler, the dataset can then be used to block the IPs at a cs/vserver or global level # This dataset is then used to block IPs using responder policies on the netscaler. # # The script assumes using HTTPS with unsecure certificate to access the netscaler, # if you have a valid certificate installed remove the -k from the curl lines, or if you want http change it accordingly (and remove the -k) # # This action depends on curl # # You need to populate the 3 options inside Init # # ns_host: IP or hostname of netslcaer appliance # ns_auth: username:password, suggest base64 encoded for a little added security (echo -n "username:password" | base64) # ns_dataset: Name of the netscaler dataset holding the IPs to be blocked. # # For further details on how to use it please check http://blog.ckzone.eu/2017/01/fail2ban-action-for-citrix-netscaler.html [Init] ns_host = ns_auth = ns_dataset = [Definition] actionstart = curl -kH 'Authorization: Basic <ns_auth>' https://<ns_host>/nitro/v1/config actioncheck = actionban = curl -k -H 'Authorization: Basic <ns_auth>' -X PUT -d '{"policydataset_value_binding":{"name":"<ns_dataset>","value":"<ip>"}}' https://<ns_host>/nitro/v1/config/ actionunban = curl -H 'Authorization: Basic <ns_auth>' -X DELETE -k "https://<ns_host>/nitro/v1/config/policydataset_value_binding/<ns_dataset>?args=value:<ip>"Private