How use public dns instead OpenWrt one

hi all!!! :sunglasses:
I need help with some config, i have a NanoStation M2, i am using nsm2 like a repeater with 3 interfaces:
WAN: this is the client connected to a public hotspot (dhcp client)
LAN: this is the default lan interfect with a (dhcp server) to my pc
AP: this is the repeater one, has another (dhcp server)
The AP interface assigns 192.168.2.1 as the DNS SERVER and I want to change it, for example: to the Google DNS or the public DNS that assigns HOTSPOT to WAN (this is my goal).
Thanks to everyone beforehand.

1 Like

I've been reading the post but it did not work, that solution is ipv6 and I would like ipv4, it's just that I change the default dns for one that I enter

The solution on that thread is IPv4-only. You can tell by the format of the IP addresses; IPv6 addresses look completely different.

4 Likes

@iplaywithtoys is correct, it is an IPv4 only configuration. I am assigning 2 DNS servers on LAN - using DHCP Option 6 in the example above:

list dhcp_option '6,8.8.8.8,8.8.4.4'

  • Google's 8.8.8.8; and
  • Google's 8.8.4.4

Hope this helps.

1 Like

Ok, thanks for responding quickly, I do not have much skill because I'm new, but I learn fast.
-my goal is to make my interface ap'' assign 4 different dns to the clients. -I should add in / etc / config / dhcp'':
list dhcp_option '6,8.8.8.8,8.8.4.4,1.1.1.1, .2.2.2.2' to work?
I'm using version 18.06.02 openwrt

I'm sorry you're absolutely right, I do not know what I was thinking. LOL

Not quite. IP addresses don't start with the "." symbol. " .2.2.2.2" won't work, but "2.2.2.2" should.

ok, it was a mistake :sweat_smile: hahaha, and how many dns can I assign? have a limit?

Test it and find out.

Try putting three addresses in the list, see if your clients pick up three DNS servers. Then try four, and so on.

The underlying process is dnsmasq, and there is a complete manual for dnsmasq at http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html

thank you very much for helping me so fast, I will try everything and when I finish I will upload my conclusions

1 Like

Note that pushing a public DNS-provider via DHCP-options makes dnsmasq DNS-function effectively useless, resulting in:

  • Inability to resolve host names in the lan-domain, unless you replace it with some kind of mDNS.
  • Redundant traffic from WAN-interface and no latency reduction for different clients due to ignoring router-level DNS-caching, and the more clients you have, the more obvious the effect is.
3 Likes

I understand, but those dns I will use in an interface different to LAN, up in the post I specified that I use 3 interfaces.
These DNS are for the DHCP of the AP interface, although you would recommend me to be able to put those public DNS without affecting the performance of the clients.
Thanks in advance, this community is incredible.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.