HAProxy not recognising dynamic public ip address change until service restart
-
Hello friendly forum peeps,
in the past month I have setup a frontend and backend in HAProxy to access my local services via subdomains of a domain I own.
Reason being I like not having to deal with certificate error messages when opening the web GUIs of my services in a web browser.For security reasons I use ACLs on the backend to perform a "http-request deny" if a local network or my domain name (DNS rebinding is annoying) is NOT recognised.
The local networks are grouped with the help of an alias but because I have not been successful in getting PfSense aliases to resolve hostnames I can't add my domain name to the alias.
So I just added my domain name as an additional "Source IP matches IP or Alias:" backed ACL rule and this works great until my ISP decides to restart my router remotely during working hours (the absolute F*cking cheek) and I receive a new IP address. Thereafter I naturally get "403: Request forbidden by administrator rule...." because my domain name does not resolve to the same public IP according to HAProxy.Do I need to change the HAProxy global dns resolver settings in order to get things automated after a change of public IP address?
Or are cron jobs my only source of respite?Thanks in advance for any help!
-
EDIT: Note that I have double NAT (using my ISP cable modem is a necessity. PfSense is "behind" it.) but have setup my WAN gateway to monitor 8.8.4.4.
-
Anyone have any ideas?