https://github.com/thetechstech/fail2ban
Fail2Ban for docker environment.
https://github.com/thetechstech/fail2ban
Last synced: about 1 month ago
JSON representation
Fail2Ban for docker environment.
- Host: GitHub
- URL: https://github.com/thetechstech/fail2ban
- Owner: TheTechsTech
- License: gpl-2.0
- Created: 2018-01-12T22:56:08.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-15T01:56:59.000Z (over 8 years ago)
- Last Synced: 2025-01-26T19:44:00.058Z (over 1 year ago)
- Language: Python
- Size: 53.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fail2ban for Docker
Fail2Ban for docker environment.
Just mounting `-v /var/log:/var/log and -v /etc/hosts.deny:/etc/hosts.deny` in all `docker run` containers can protect your expose ports from abuse.
This build has Webmin http://www.webmin.com/ installed to easy update underlining image and manage fail2ban.
It can be disable by passing `–e WEBMINPORT=off`
### Usage
To run it:
```
$ docker run --name fail2ban \
-v /var/log:/var/log \
-v /etc/hosts.deny:/etc/hosts.deny \
-v fail2ban-etc:/etc/ \
--net=host --restart=always \
--cap-add=NET_ADMIN \
--hostname=server.fail2ban.host \
-e WEBMINPORT=19999 \
-d technoexpressnet/fail2ban
```
This build also assume reverse proxy is setup.
This build setup to use https://github.com/adi90x/rancher-active-proxy
```
-v /nginx/rancher-active-proxy/letsencrypt/archive/server.fail2ban.host:/etc/letsencrypt/archive/server.fail2ban.host \
-l rap.host=server.fail2ban.host \
-l rap.le_host=server.fail2ban.host \
-l rap.https_method=noredirect \
```
### Docker Hub
https://hub.docker.com/r/technoexpress/fail2ban/builds/ automatically builds the latest changes into images which can easily be pulled and ran with a simple `docker run` command.