Hello,
I have some 6-7 VLANs on top of VLAN 1.
I have the need to define different subdomains for 3 of these VLANs, let’s say sub1.lan sub2.lan and sub3.lan.
DNS for the lan is managed outside of Flint 2. However, I want the router to be the DNS authoritative server for the sub-domains. I also want to have automatic DHCP leases for the clients on these subdomains.
Is this possible?
I think you want to setup a manual dns on the gl ui.
As far how the domains go this depends which version of luci you are using, modern luci have a way to manage dns records, you want a A record.
Otherwise you need to use this via ssh directly on the dhcp config for a domain:
config domain
option name 'seerr.lan'
option ip '10.245.245.53'
If it still does not work and you see a 'dns probe possible' it means the authority of the lan domain clashes with upstream you may have to delete the /lan/ entry in the luci settings, the one with the / trailing GL-iNet uses a longer naming.
1 Like
Hi,
Assume the local domain for the Main network is .lan, and the local domain for the Guest network is .guest.
The reference steps are as follows:
-
SSH into the router and manually edit /etc/dnsmasq.conf to add local domain access:
domain=lan,192.168.8.0/24
domain=guest,192.168.9.0/24
-
Go to LuCI → Network → Interfaces → Interfaces, edit the LAN and Guest networks, and add the following DHCP options respectively:
-
For LAN:
option:domain-name,lan
option:domain-search,lan
-
For Guest:
option:domain-name,guest
option:domain-search,guest
Test results:
-
PC and phone are both on the LAN network:
-
PC and phone are both on the Guest network:
-
PC is on LAN, and the phone is on Guest:
Actually this is not what I am asking for!
In any case, the answer is yes I can have a different domain per VLAN. However, I didn’t see any option to do this via the GUI. One has to:
-
Edit the main dnsmasq configuration file to allow per-VLAN domains
Don’t forget to add the file in the reserve list!
-
Edit the DHCP configuration for the VLAN
If anyone is interest I can send samples.