This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| tips:fail2ban [2019/04/15 07:57] – created scipio | tips:fail2ban [2019/04/15 09:04] (current) – [telegram action] scipio | ||
|---|---|---|---|
| Line 22: | Line 22: | ||
| fail2ban-regex / | fail2ban-regex / | ||
| </ | </ | ||
| + | |||
| + | ===== action ===== | ||
| + | |||
| + | <file ini action.d/ | ||
| + | [Definition] | ||
| + | actionstart = / | ||
| + | actionstop = / | ||
| + | actioncheck = | ||
| + | actionban = / | ||
| + | actionunban = | ||
| + | |||
| + | [Init] | ||
| + | init = ' | ||
| + | </ | ||
| ===== jail ===== | ===== jail ===== | ||
| Line 34: | Line 48: | ||
| bantime = 6000 | bantime = 6000 | ||
| maxretry = 3 | maxretry = 3 | ||
| + | action = %(action_)s | ||
| + | | ||
| </ | </ | ||
| Line 58: | Line 74: | ||
| < | < | ||
| - | fail2ban-client set YOURJAILNAMEHERE | + | fail2ban-client set giano-login |
| </ | </ | ||
| + | |||
| + | ===== telegram action ===== | ||
| + | |||
| + | < | ||
| + | pip install telegram-send | ||
| + | </ | ||
| + | |||
| + | create configuration file with token and chat id | ||
| + | <file ini / | ||
| + | [telegram] | ||
| + | chat_id = | ||
| + | token = | ||
| + | </ | ||
| + | |||
| + | test (-g option to use / | ||
| + | < | ||
| + | telegram-send -g " | ||
| + | </ | ||
| + | |||