How to , and other stuff about linux, photo, php … A linux, photography blog. To remember some linux situation, and fix them quickly.

April 21, 2020

BFD – r-fx network ignore cdir

Filed under: Linux — Tags: , , , , — admin @ 12:46 pm

I personally like the r-fx project with apf / bfd firewall . I am using from long time and is great. One of the feature that is missing is that you can not exclude cdir format from bfd. My workarround was to install the grepcidr package and then on line 137 of /usr/local/bfd/bfd to modify it from

CHKHOST_IGNORE=`cat $file | grep -v “#” | grep -w $ATTACK_HOS`

into

CHKHOST_IGNORE=`/usr/bin/grepcidr -f $file <(echo $ATTACK_HOST)`

After this you can add x.x.x.x/y format

July 21, 2015

Manually unban ip blocked by fail2ban

Filed under: Linux — Tags: , , , , — admin @ 9:46 am

Well if you have an ip banned then you should deleted as this

iptables -L --line-numbers

And then run this where chain-name you should replace it with what name you have there for example fail2ban-ssh
iptables -D chain-name 2

 

Short update on this

You can run also

fail2ban-client status

and after this

With Fail2Ban before v0.8.8:

fail2ban-client get YOURJAILNAMEHERE actionunban IPADDRESSHERE

With Fail2Ban v0.8.8 and later:

fail2ban-client set YOURJAILNAMEHERE unbanip IPADDRESSHERE

Powered by WordPress