Set up local domain in OpenWrt

I have a TP-Link TL-MR 3420 v2 router set up as a Wi-Fi repeater running OpenWRT. The router has been set up in a "briged mode". The router is connected to my phone's hotspot through OpenWRT's "join network" feature. DHCP is disabled on the router and is set up to forward DHCP requests to the phone.

I want to make the router's administration page (192.168.1.1) accessible through a local domain name (openwrt.wrt) via Wi-Fi without messing with hosts file and such. I've tried various different methods to try to set up the domain and all doesn't work.

Note that when I'm doing the settings, I'm connected to the router's Wi-Fi repeater hotspot on another phone and set up the phone to manually set a static ip address (192.168.1.128) and connect to the router's gateway address (192.168.1.1)

I would like to know a number of different ways to set up the local domain on the OpenWRT router and a brief step by step as I'm new to setting this up on a router.

Here are some additional information that might help



Edit: I have tried dnsmasq's dns forwarding feature with '/openwrt.wrt/192.168.1.1/' and it doesn't work. Also, if i change the dns from 8.8.8.8 to any other address while connected to the router, the phone cant even resolve 192.168.1.1. it seems to me that somehow i need to set up something on the router to be the '8.8.8.8' address guy but i dont know how. Maybe someone can show me how?

Why? What exactly is the layout of your network? Are you intending all clients to sit behind the router?

1 Like

If you want the router to be openwrt.wrt then your local domain probably should be wrt.

You don't need to change the host name of the router since it is openwrt by default. It can be changed in the system config.

1 Like

The reason i disabled dhcp is because it is one of the step required to complete the step in setting up a wifi repeater in the official openwrt documentation page.

So then you phone is distributing the DNS server IP so whatever you do on the router with dnsmasq wouldn't have any impact unless your phone distributes the router as DNS server.

1 Like

What exactly is the layout of your network? Are you intending all clients to sit behind the router?

So what i have set my hostname is currently TP-LINK_659534. From what i understand, i should change the local domain in dnsmasq to 'wrt' and then the link would be TP-LINK_659534.wrt with the hostname in all caps?

Um yup exactly. The coverage for the phone's wifi hotspot in my house isn't wide enough. So i set up a wifi repeater to extend the range

The default local domain is .lan
So your router will be openwrt.lan

You can either add openwrt.wrt to the hosts file or change the local domain to wrt in the dnsmasq config.
In conclusion, you will have to modify something if the standard openwrt.lan is not good enough for your needs.

1 Like

Host names should only contains a-z, 0-9, and "-". You shouldn't use underscores in hostnames.

1 Like

Alright I'll try to change the hostname

It seems you totally ignored my feedback.
You can change the hostname 10 times unless your clients are using the router as DNS server nothing will change.

2 Likes

When I'm using the router for internet, i will set the ip Settings (in android) to dhcp which the client will connect to the phone's gateway (192.168.43.1).

I'll change the ip settings back to manual, as said in the above post with a static ip address of 192.168.1.128 and set the gateway to the router's gateway (192.168.1.1) whenever i need to do something on the router

At least, in theory there shouldn't be any problem when accessing the link when on a client

But, feel free to correct me if im wrong

Sorry I lost you on these different setups. So only thing I can tell you is that if you want to use the local name resolution of the Openwrt router your clients need to have the DNS Server IP pointing to the router.

Yup that is exactly what i did when i need to do something on the router

I would like to ask if it is possible to set a dummy dns server like 8.8.8.8 on the router and the router will listen to the 8.8.8.8 dns server

Enable dnsmasq, set up bridge firewall and configure DNS hijacking.

2 Likes