This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
сервис_fail2ban [2021/02/23 17:25] val [Блокировка через cisco acl] |
сервис_fail2ban [2022/03/09 11:51] val [Блокировка через cisco acl] |
||
---|---|---|---|
Line 8: | Line 8: | ||
<code> | <code> | ||
+ | debian11# apt install iptables | ||
+ | |||
# apt install fail2ban | # apt install fail2ban | ||
</code> | </code> | ||
Line 54: | Line 56: | ||
===== Интеграция fail2ban и cisco log ===== | ===== Интеграция fail2ban и cisco log ===== | ||
+ | |||
+ | * Резервное копирование конфигурации | ||
+ | |||
<code> | <code> | ||
# cat /etc/fail2ban/jail.d/cisco-change-config.conf | # cat /etc/fail2ban/jail.d/cisco-change-config.conf | ||
Line 78: | Line 83: | ||
cd /srv/tftp/ | cd /srv/tftp/ | ||
/usr/bin/git add * | /usr/bin/git add * | ||
- | /usr/bin/git status | grep 'modified\|deleted\|new file' | /usr/bin/git commit -a -F - | + | /usr/bin/git --no-optional-locks status | grep 'modified\|deleted\|new file' | /usr/bin/git commit -a -F - |
</code> | </code> | ||
===== Интеграция fail2ban и snort ===== | ===== Интеграция fail2ban и snort ===== | ||
Line 151: | Line 156: | ||
<code> | <code> | ||
+ | server# rsh router show access-lists | ||
+ | </code><code> | ||
# cat /root/cisco-acl-deny.sh | # cat /root/cisco-acl-deny.sh | ||
</code><code> | </code><code> | ||
Line 170: | Line 177: | ||
permit udp any any | permit udp any any | ||
permit tcp any any established | permit tcp any any established | ||
- | deny ip any any log | + | deny ip any any # log |
end | end | ||
</code><code> | </code><code> |