D
D
Dim Boy2020-12-18 19:07:59
linux
Dim Boy, 2020-12-18 19:07:59

Is it possible to use Fail2Ban from within docker?

Is it possible to somehow use Fail2Ban from under docker for the main OS?
I don't want to constantly adjust from 0.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sanes, 2020-12-18
@Sanes

I don't want to constantly adjust from 0.

Write an Ansible playbook or Bash script.

D
Dmitry, 2020-12-18
@dmtrrr

Try running with network=host

S
shurshur, 2020-12-19
@shurshur

Well, as if it is quite possible. You need --net=host in order for fail2ban to edit iptables on the host, you need to upload (or drive into the image) the config, you need to upload the logs it studies, and don't forget about privileged mode. But why? He, in fact, only needs to configure the config once and use it everywhere, ansible was already advised above to simplify this operation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question