I am having some troubles setting up keepalived using the container. Basically, I cannot manage to make it work. I have set up a simple VRRP with virtual IP 192.168.1.9. My config is this one:
global_defs {
router_id dns-homeassistant # hostname is used by default
}
vrrp_instance ADGUARD {
state MASTER
interface end0
virtual_router_id 33
priority 100
advert_int 2
authentication {
auth_type PASS
auth_pass adguard
}
virtual_ipaddress {
192.168.1.9/24 dev end0
}
}
The addon seems to start and sets the virtual IP and MASTER state (I have not setup any other keepalived node yet).
Tue Feb 4 09:23:09 2025: (ADGUARD) Entering BACKUP STATE (init)
Tue Feb 4 09:23:09 2025: VRRP sockpool: [ifindex( 2), family(IPv4), proto(112), fd(12,13) multicast, address(224.0.0.18)]
Tue Feb 4 09:23:16 2025: (ADGUARD) Receive advertisement timeout
Tue Feb 4 09:23:16 2025: (ADGUARD) Entering MASTER STATE
Tue Feb 4 09:23:16 2025: (ADGUARD) setting VIPs.
Tue Feb 4 09:23:16 2025: (ADGUARD) Sending/queueing gratuitous ARPs on end0 for 192.168.1.9
Tue Feb 4 09:23:16 2025: Sending gratuitous ARP on end0 for 192.168.1.9
Tue Feb 4 09:23:16 2025: Sending gratuitous ARP on end0 for 192.168.1.9
Tue Feb 4 09:23:16 2025: Sending gratuitous ARP on end0 for 192.168.1.9
Tue Feb 4 09:23:16 2025: Sending gratuitous ARP on end0 for 192.168.1.9
Tue Feb 4 09:23:16 2025: Sending gratuitous ARP on end0 for 192.168.1.9
Tue Feb 4 09:23:21 2025: (ADGUARD) Sending/queueing gratuitous ARPs on end0 for 192.168.1.9
Tue Feb 4 09:23:21 2025: Sending gratuitous ARP on end0 for 192.168.1.9
Tue Feb 4 09:23:21 2025: Sending gratuitous ARP on end0 for 192.168.1.9
Tue Feb 4 09:23:21 2025: Sending gratuitous ARP on end0 for 192.168.1.9
Tue Feb 4 09:23:21 2025: Sending gratuitous ARP on end0 for 192.168.1.9
Tue Feb 4 09:23:21 2025: Sending gratuitous ARP on end0 for 192.168.1.9
After that, I can ping the virtual IP 192.168.1.9 succesfully:
> ping 192.168.1.9
PING 192.168.1.9 (192.168.1.9) 56(84) bytes of data.
64 bytes from 192.168.1.9: icmp_seq=1 ttl=64 time=0.338 ms
64 bytes from 192.168.1.9: icmp_seq=2 ttl=64 time=0.254 ms
However, it does not seem to reach the adguard addon on port 53. If I do:
> dig @192.168.1.9 example.com
;; communications error to 192.168.1.9#53: connection refused
I can reach the adguard addon in the real home assistant IP (in my case 192.168.1.30):
> dig @192.168.1.30 example.com
; <<>> DiG 9.18.28-1~deb12u2-Debian <<>> @192.168.1.30 example.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13584
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;example.com. IN A
;; ANSWER SECTION:
example.com. 251 IN A 23.215.0.138
example.com. 251 IN A 96.7.128.198
example.com. 251 IN A 96.7.128.175
example.com. 251 IN A 23.192.228.80
example.com. 251 IN A 23.215.0.136
example.com. 251 IN A 23.192.228.84
;; Query time: 39 msec
;; SERVER: 192.168.1.30#53(192.168.1.30) (UDP)
;; WHEN: Tue Feb 04 09:27:40 CET 2025
;; MSG SIZE rcvd: 136
Any ideas what might be happening? Does the adguard addon only respond to queries to the real IP?