Change source IP at outgoing packet send by Bind9 as forwarder.

CpServiceSPb . cpservicespb at gmail.com
Thu Oct 17 21:16:19 UTC 2019


I have Bind9 on Ubuntu 18.04 x64 LTS working as a cache and forwarding one.
There are some forwarders IPs.

Server has 2 NICs (lan and wan) .

BInd9 binds strictly to localhost and lan NICs, that is to 127.0.0.1 and
192.168.0.1.
But when Bind9 forwards queries to external servers, it do it via wan
interface but uses at the first onset server external IP as sources, which
is not changed by SNAT or MASQUERADE Iptables.
Unlike other soft, for example Asterisk, what is binded to lan interface
only and uses internal (192.168.0.1) IP as source for outgoing packet and
then iptables changes source address of such outgoing packets from internal
to external using either SNAT or MASQUERADE.

So how is to change Bind9 , what and where is to set up and waht setting
that Bind9 would send forwarding packet via wan interface but would use
address what it is binded to or internal, if it is binded to 127.0.0.1 and
192.168.0.1 ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/bind-users/attachments/20191018/a8046670/attachment.htm>


More information about the bind-users mailing list