Outgoing address not set according to interface for remotes
Summary
Knot is using default OS address for reaching remotes even if there is only one defined interface in knot configuration with different IP.
I'm aware that interface definition is listening IP but it make more sense to use it also for outgoing connections.
There is currently easy solution using via
in remotes
definition but IMHO it should work without it out of the box.
Detail
- We have multiple IPs set on dns server with knot.
- There is only one interface defined in our interfaces section
- There is only one IPv4 address for this interface.
- This IP isn't default for Linux on this machine.
- Knot is slave server in our setup.
- Using version 1.4.6+hotfix-1~bpo70+1 (tested in 1.4.3 too)
Configuration:
knot server has two IPS: 1.2.3.1 (default on linux) and 1.2.3.2
interfaces {
interface1 { address 1.2.3.2; }
}
remotes {
master {
address 5.5.5.5@53;
}
}
"Problem" is that on master we allowed AXFR transfer only for 1.2.3.2 but knot is sending request through default linux address 1.2.3.1.
Solution for now is using via
keyword so master definition is:
master {
address 5.5.5.5@53;
via 1.2.3.2;
}