Solved Resolving dns queries from unbound on carp interface

Hello,
I have two machines with freebsd 11.2 (IP: 10.0.2.11/24 and 10.0.2.12/24). CARP is set between them (10.0.2.10).
This is code from one of them:
Code:
ifconfig_em0 = "iet 10.0.2.11 netmask 255.255.255.0"
ifconfig_em0_alias0 = "inet vhid 1 advskew 100 pass XXX alias 10.0.2.10/32"

Everything works fine, ping on 10.0.2.10 responds. After disconnecting one of them, you switch over and the ping responds all the time. I can do the same with ssh on 10.0.2.10. So it's OK.

I want to have a dns cache service, so I started unbound on these machines with the same configuration.

When I ask dns for the addresses of these machines from lan, I get the correct answers, but when I ask the address carp, I get:
Code:
reply from unexpected source: 10.0.2.11 # 53, expected 10.0.2.10 # 53


Is it possible to somehow force these answers to go from the address I ask?
 
I found that I couldn't get unbound to respond at all on a carp address. In the end I had to add specific interface <carp-ip> entries to the unbound config and force it to run on each address that I wanted to use it on.
 
Yes, you have right :D
I add this line with carp address. Now I have unbound run with option:
Code:
interface: 0.0.0.0
interface: 10.0.2.10
and it's doing exactly what I want.
Thank you.
 
Back
Top