OpenWrt Forum Archive

Topic: dns all site to one ip

The content of this topic has been archived on 18 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi

I made a zone (lan1 192.168.0.0) in my router, and I want to make a dns server what the all of dns request answer 192.168.0.1

for example
the client want to go to google.hu
he go to 192.168.0.1

I make a redirect so if he try to go to 1.1.1.1 he go to 192.168.0.1

but if he want to go to google.hu he cannot go 192.168.0.1 because he cant go to dns because he cannot use internet.

But I have a lan zone and I would like to it use the internet, and it can use dns normal

just zone lan1 use the fake dns what forward to 192.168.0.1

Sorry my English.

Thank you for help me.

Divert DNS traffic to your router:

iptables -t nat -I PREROUTING -i br-lan -p udp --dport 53 -j DNAT --to 192.168.0.1
iptables -t nat -I PREROUTING -i br-lan -p tcp --dport 53 -j DNAT --to 192.168.0.1

Make a DNS catchall:

echo "address=/#/192.168.0.1" >> /etc/dnsmasq.conf

Thank you the answer it's good

The discussion might have continued from here.