Is there a way to force IPv4 when using the SSL Proxy addon?
I’m using fail2ban on the host OS, HassIO installed using “generic Linux” method (docker). Fail2ban will read off homeassistant.log and get the login failure IP as per cookbook. https://www.home-assistant.io/cookbook/fail2ban/
But it does not seem to work. NGINX reports IPv6 but somehow fail2ban bans IPv4 address. End result is I can still access my HA even when IPv4 is on the fail2ban banned list.
(I prefer fail2ban over HA http auth provider, because it gives me more tweaking options)
This thread suggests making changes in NGINX to disable IPv6:
So, how do I force the core NGINX addon (not the NGINX manager community addon) to disable IPv6?
Alternatively, is there more documentation and/or example on how to use “customize” options?
I’ve even tried downloading the addon source files and created an addon repository to host my modified nginx.conf. But somehow, the running /etc/nginx.conf in the container is still the old one?? https://github.com/wyx087/hassio-addons-example
Any help is much appreciated… just need to remote “[::]:” between listen and 443 in the resulting nginx docker container /etc/nginx.conf file
I’m wondering whether I’m barking up the wrong tree?
Fail2Ban modifies IPtables on the host OS. But HA failed log-in is in docker container, goes from NGINX container to HA container via the docker interface 172 address range.
But I would have thought anything going into docker containers still has to pass through the host OS IPtable?
Currently, I’ve given up on this and resorted to use the built-in HTTP IP ban functionality. Hope people with more knowledge can find a way to get fail2ban to work on HassIO generic Linux install.
BUT fail2ban still doesn’t work. It sees the IP (v4) in the log, its jail status shows the external IP has been banned. But I can still access HA through this external IP !?!
That confirms I’ve been barking up the wrong tree. The problem is somewhere else, not with IPv6 or v4. Problem is probably my configuration of fail2ban and/or docker host.