Skip to content

Commit 01d60e2

Browse files
authored
Merge pull request #13 from nomandera/patch-1
Remove -XPOST as curl reports it is not necessary
2 parents 92549e2 + 461531a commit 01d60e2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

action.d/opnsense.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Version 2022/08/16
1+
## Version 2023/02/16
22
#
33
# Fail2Ban action configuration for OPNsense
44
# Author: https://linuxserver.io/
@@ -45,15 +45,15 @@
4545
# Tags: See jail.conf(5) man page
4646
# Values: CMD
4747
#
48-
actionban = curl <_allow_insecure> -s -XPOST -d '{"address":"<ip>"}' -H "Content-Type: application/json" -u "<key>":"<secret>" https://<firewall>/api/firewall/alias_util/add/<alias>
48+
actionban = curl <_allow_insecure> -s -u "<key>":"<secret>" -H "Content-Type: application/json" -d '{"address":"<ip>"}' https://<firewall>/api/firewall/alias_util/add/<alias>
4949

5050
# Option: actionunban
5151
# Notes.: command executed when unbanning an IP. Take care that the
5252
# command is executed with Fail2Ban user rights.
5353
# Tags: See jail.conf(5) man page
5454
# Values: CMD
5555
#
56-
actionunban = curl <_allow_insecure> -s -XPOST -d '{"address":"<ip>"}' -H "Content-Type: application/json" -u "<key>":"<secret>" https://<firewall>/api/firewall/alias_util/delete/<alias>
56+
actionunban = curl <_allow_insecure> -s -u "<key>":"<secret>" -H "Content-Type: application/json" -d '{"address":"<ip>"}' https://<firewall>/api/firewall/alias_util/delete/<alias>
5757

5858
# Internal variable handler for `allow_insecure`
5959
_allow_insecure = $(if [ '<allow_insecure>' = true ]; then echo ' -k '; else echo ''; fi;)

0 commit comments

Comments
 (0)