Some mistakes with 'http://openwrt.lan', maybe about custom domain and dns config

The cause

Last night, I upgrade my Netgear R6220 from 19 to OpenWrt 21.02.1. And I saw a great feature. After the firmware installed the browser was redirecting to openwrt.lan. It's amazing and cool.In the past years. I was desire about this feature.

But, some mistakes come to me. The default LAN ip is 192.168.1.1. I changed it to other IP address. After that, I cannot visit openwrt.lan even I changed to 192.168.1.1 again. It's terrible. I am not familiar with the network.

So, I just have only one issue with the custom domain. And I can login to my router by the ip address. Now, the router is working well.

My confusion

  1. Why I cannot visit the openwrt.lan again?
  2. How does the custom domain work?

The capture image

Update after 8 hours

The reason is hostname was changed. I changed it to default name OpenWrt and the custom domain http://openwrt.lan works well. :tada:

I got some useful informations from some serchs. Maybe I got the origin, I noticed a key word dnsmasq. It's a software in OpenWrt. And it was default installed in the firmware.

So, the next challenge is learn more about dnsmasq.
eg. How to config it with a new hostname.

Thanks to you cool guys. :rose:

First try to clear browser cache, use private browsing, or use another browser.
You can always connect with the IP of the router, as most likely your lan host got dhcp settings from OpenWrt when it still was .1.1 and it still uses this address as a dns resolver. Did you renew the dhcp after you changed the IP?

1 Like

I assume you changed OpenWrt's hostname (under system) as well, that's where the DNS <--> IP mapping comes from.

2 Likes

Thanks Very much.

Yes, I was trying by another clear operating environment. I used private mode and another browser.

No, my computer got a new ip address from the NEW dhcp server. Because I restarted the network in my computer and reboot the OpenWrt router system.

Maybe I didn't describle my mistake in a right way. The core mistake is the domain http://openwrt.lan was not working.

Yes, I changed the hostname to OpenWrt-R6220.
Just now, I change it to the default name OpenWrt and the urlopenwrt.lan works done!
Thanks very much. :kissing_heart:

By the way, could you please share me some documents or wikis about this. I want to learn more about this feature. :rose:

dhcp.@dnsmasq[0].local='/lan/'
dhcp.@dnsmasq[0].domain='lan'

Did you have LAN as management interface or interface from where you tried to connect? In DHCP server settings you have default dns name with is default preset to lan.
If you change your interfaces you will need to update this setting to, i think?

1 Like

Yes, I saw the textfield DNS name: lan in windows 10 task manager.
But I cannot understand your solution clearly.

Are these two config lines changed in SSH environment?

https://openwrt.org/docs/guide-user/base-system/dhcp
I mostly copied from dhcp manual so you would know what I talked about. I am not an expert for exactly what these lines do but I am pretty sure they have something to do with the .lan you have after openwrt.

You could change these with ssh as uci code.
But if you call the router ip address you can probably login to luci to change them from GUI

1 Like

If you change the hostname, the router will be found at its new hostname: newhostname.lan or in your case OpenWrt-R6220.lan Hostnames are not case-sensitive, uppercase letters are treated the same as lowercase, so openwrt-r6220.lan would also work.

4 Likes

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