Can Dnsmasq or DNRD forward all DNS packets pass my router?

0

I have a embedded Linux box as a router which has two interfaces.

One interface is connected to public network by dialing into ISP.

Another interface (its IP is 192.168.1.1) is connected to LAN clients by a simple hub.

If a client send a DNS query to a DNS ex:5.6.7.8, I want capture this query and forward/relay to another DNS ex: 1.2.3.4.

I want to know if utility like Dnsmasq or DNRD can do this?

I know Dnsmasq and DNRD can forward DNS query that just ask to Linux box (LAN client set DNS as 192.168.1.1). But I don't know if they can handle ALL DNS query pass Linux box?

Please Help~ I have bothered by this some days.. Thanks every responders.

user2496414

Posted 2013-06-18T09:14:57.233

Reputation: 1

this is off topic here, it's not programming related. – Alnitak – 2013-06-19T16:12:25.520

Answers

0

dnsmasq can't do it by itself, but you could in theory configure an outbound iptables rule in the O/S itself that will intercept all outbound DNS queries and redirect them on somewhere else.

I wouldn't recommend it, though. It rather depends on what problem you're trying to solve. Messing with DNS queries is likely to cause pain in the long run.

Alnitak

Posted 2013-06-18T09:14:57.233

Reputation: 656

Because I would like to redirect all DNS packets that pass my embedded Linux box (actually a home AP router) to a Symantec's Norton ConnectSafe DNS. Norton ConnectSafe DNS will respond only the DNS query that asks what is not adult/malicious/non-family friendly URL. – user2496414 – 2013-06-24T02:36:21.133