Test enviroment:
WS(192.168.141.151)—>
eth1(192.168.41.2)_LINUX_eth0(202.201.200.199)---->ISP(202.201.200.1)
eth2(192.168.43.2)|
In the Linux with 3 ethernet interfaces and installed bind.
default gateway is: 202.201.200.1
Server have 3 ethernet interfaces:
eth0: 202.201.200.199
eth1: 192.168.41.2
eth2: 192.168.43.2
bind is configured to listen for requests on :
127.0.0.1
192.168.41.2
192.168.43.2
bind forwards all received requests to the 8.8.8.8 server.
The "WS "workstation sends a DNS query (a-record asks the www.microsoft.com server) to the server 192.168.41.2.
BIND receives a request from WS and forms a request to the server 8.8.8.8.
BIND sends the generated request to 8.8.8.8.
The question is: What will be the source ip address of this packet before NAT changes it to 202.201.200.199
?
which one :
192.168.41.2
or
192.168.43.2
or
127.0.0.1
?
BIND receives a request from WS and forms a request to the server 8.8.8.8.
BIND sends the generated request to 8.8.8.8.
The question is: What will be the source ip address of this packet before NAT changes it to 202.201.200.199
I do not know if I understand you. When your own DNS server (the one running bind) sends a request to another DNS server, (in your case 8.8.8.8) because it does not know the answer, that is just a request. It will not tell 8.8.8.8 that it did so because client X asked him and he did not know. So the source is the address were bind sends out it’s request.