Update 'README.md'
This commit is contained in:
parent
8f8dc942ff
commit
497f8e61e3
49
README.md
49
README.md
@ -1,3 +1,52 @@
|
||||
Conigure fail2ban for docker:
|
||||
|
||||
1 - Create volume for nginx in -volumes
|
||||
"./log:/var/log/nginx/"
|
||||
|
||||
Then add following lines to /etc/fail2ban/jail.local
|
||||
|
||||
[nginx-http-auth]
|
||||
enabled = true
|
||||
port = http,https
|
||||
logpath = /opt/container_webservice/logs/error.log
|
||||
banaction = iptables-multiport-forward
|
||||
|
||||
[nginx-limit-req]
|
||||
enabled = true
|
||||
port = http,https
|
||||
logpath = /opt/container_webservice/logs/error.log
|
||||
banaction = iptables-multiport-forward
|
||||
|
||||
[nginx-botsearch]
|
||||
enabled = true
|
||||
port = http,https
|
||||
maxretry = 2
|
||||
logpath = /opt/container_webservice/logs/error.log
|
||||
banaction = iptables-multiport-forward
|
||||
|
||||
[php-url-fopen]
|
||||
enabled = true
|
||||
port = http,https
|
||||
logpath = /opt/container_webservice/logs/access.log
|
||||
banaction = iptables-multiport-forward
|
||||
|
||||
Adjust logpath (usually /home/user/acme-companion/log/error.log)
|
||||
|
||||
Then:
|
||||
|
||||
cd /etc/fail2ban/action.d
|
||||
cat iptables-common.conf > iptables-common-forward.conf
|
||||
sed -i 's/INPUT/FORWARD/g' iptables-common-forward.conf
|
||||
|
||||
cat iptables-multiport.conf > iptables-multiport-forward.conf
|
||||
sed -i 's/iptables-common.conf/iptables-common-forward.conf/g' iptables-multiport-forward.conf
|
||||
|
||||
Restart fai2ban and verify (systemctl status fail2ban)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||

|
||||
[](https://github.com/nginx-proxy/acme-companion/releases)
|
||||
[](https://hub.docker.com/r/nginxproxy/acme-companion "Click to view the image on Docker Hub")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user