Alex Harsch wrote:
> Nils Gorges wrote:
>
>
>>Hello,
>>
>>i have a problem with Linux, DNS and a NAT-Router.
>>
>>
>>The Linux machins has a private ip, the NAT-router is configured as the
>>DNS server. The NAT router itself uses DDNS and forwards all enquries to
>>the providers DNS server.
>>
>>The problem is, the NAT router will not translate the ip addresses in
>>the answer packages of the providers DNS server. So for the Linux
>>machine it looks like the DNS answer is coming from another machine as
>>the enquiry was sent to. The enquiry was sent to the NAT router, the
>>answer is coming from the providers DNS. Because of that DNS doesn't work.
>>
>>Is there a way to exchange the source IP address of the DNS answering
>>packagages to the nat-routers IP, maybe by iptables?
>>
>>Thanks for any help
>>
>>Nils
>
> Hi Nils,
>
> iptables -t nat -A POSTROUTING -i Ext_Interface -s DNS-Server-IP -j SNAT
> --to-source Router-IP
> on the router should be fine.
>
> Regards, Alex
Hi Alex,
thank you very much for the fast reply.
The next problem is, the providers DNS is assigned by Dynamic DNS, so i
don't know the DNS IP for sure. So i need to translate the ip addresses
of all package that are comping from port 53 to the nat-routers ip
address. Is that also possible?
Thank you again
Nils
|