Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fail2Ban DROP instead REJECT
#Depending on version one of the following files must exist
root@host:/ nano /etc/fail2ban/action.d/iptables-blocktype.conf
or
root@host:/ nano /etc/fail2ban/action.d/iptables-common.conf
comment the line
#blocktype = REJECT --reject-with icmp-port-unreachable
create the line
blocktype = DROP
@radjah

This comment has been minimized.

Copy link

radjah commented Feb 8, 2019

Write it to iptables-common.local

@caffeinatedgoat

This comment has been minimized.

Copy link

caffeinatedgoat commented Jun 2, 2019

Why is the default REJECT? Surely DROP is better?

@openweather-me

This comment has been minimized.

Copy link

openweather-me commented Jul 8, 2019

Because it not sending packet back. So not using your outgoing traffic.
Also attacker doesn't known if packet reach the destination.
He will wait establishing TCP connection until timeout. So he is using more resources.

@caffeinatedgoat

This comment has been minimized.

Copy link

caffeinatedgoat commented Jul 14, 2019

Exactly my point, so why isn't DROP used?

@gstlouisgit

This comment has been minimized.

Copy link

gstlouisgit commented Sep 24, 2019

an old but related conversation
fail2ban/fail2ban#507

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.