handmatige ban IP m.b.v. fail2ban-client
Hoi,
Hoe gedraagt `fail2ban-client set <JAIL> banip <IP>` zich bij jullie?
Wat ik doe is
fail2ban-client set ssh banip 10.100.10.100
en krijg als reactie het IPv4 adres als output op het scherm terug.
Dus geen foutmelding.
Vervolgens
iptables -L -n
met als output
| Chain INPUT (policy ACCEPT)
| target prot opt source destination
| fail2ban-ASTERISK all -- 0.0.0.0/0 0.0.0.0/0
| fail2ban-ssh tcp -- 0.0.0.0/0 0.0.0.0/0 multiport dports 22
|
| Chain FORWARD (policy ACCEPT)
| target prot opt source destination
|
| Chain OUTPUT (policy ACCEPT)
| target prot opt source destination
|
| Chain fail2ban-ASTERISK (1 references)
| target prot opt source destination
| DROP all -- 188.165.229.49 0.0.0.0/0
| RETURN all -- 0.0.0.0/0 0.0.0.0/0
|
| Chain fail2ban-ssh (1 references)
| target prot opt source destination
| RETURN all -- 0.0.0.0/0 0.0.0.0/0
Bij de chain "fail2ban-ssh" had ik "DROP 10.100.10.100" verwacht,
net als chain "fail2ban-ASTERISK" een DROP staat.
Is nu mijn verwachting onjuist? Doe ik het bannen onjuist?
Of is er toch iets kapot?
Groeten
Geert Stappers
--
# fail2ban-client status ssh
Status for the jail: ssh
|- filter
| |- File list: /var/log/auth.log
| |- Currently failed: 1
| `- Total failed: 2
`- action
|- Currently banned: 0
| `- IP list:
`- Total banned: 0
# fail2ban-client status asterisk-iptables
Status for the jail: asterisk-iptables
|- filter
| |- File list: /var/log/asterisk/messages
| |- Currently failed: 1
| `- Total failed: 15
`- action
|- Currently banned: 1
| `- IP list: 188.165.229.49
`- Total banned: 2
#
Reply to: