Up until this point I’ve learned of 3 methods for designing the Restart Dnsmasq DD WRT, so it will perform DNS for your neighborhood organization. I don’t actually realize what direction is liked by the engineer of the DD-WRT. Anything that technique you use, you could not “see” the normal outcomes on your PC until you reboot the PC or restart the organization interfaces.
My model experiment was hindering Asus Router RT-N12 upon beginning boot and making a content to physically impede and unblock it thereafter. It was a tomfoolery experience! I utilized the DD-WRT WebUI to arrangement the accompanying order at startup which defaults to hindered.
Dnsmasq is a light-weight DNS, TFTP and furthermore DHCP web server. It is wanted to give coupled DNS and furthermore DHCP answer for a LAN. Dnsmasq DD WRT endorses DNS questions and furthermore either addresses them from a minuscule, neighborhood, reserve or advances them to a genuine, recursive, DNS web server. This product program is furthermore mounted a few affordable switches to reserve dns questions. Basically reactivate to get out dns store.
1) Editing the /etc/hosts file
This is most likely the primary spot one endeavors getting this to work on the off chance that you have a *nix foundation. It takes care of business here with an admonition; in the wake of altering/and so on/has, restart DNSMasq. /tmp/has gets reproduced on boot. To make this fix tireless, set up a startup content to add the new accounts in/tmp/has. Since the startup content will pursue Restart Dnsmasq DD WRT, you likewise need to tell dnsmasq to reload.
For instance, assuming that you populate your/and so forth/has with the startup_rc script like:
- reverberation ‘192.168.1.50 somename’ >>/and so forth/has
- reverberation ‘192.168.1.51 othername otheralias’ >>/and so forth/has
- killall – HUP dnsmasq
Ultimately, on the off chance that you believe the switch should attach your space on DNS demand, put “extend has” into the DNSMasq different choices
2) Additional DNS Options (in Services)
- Before v24 it was in Administration > Management
- Before v23 SP1 Final it was in Administration->Services->DNSMasq
You can enter DNS information about machines in this configuration:
- address=/machine_name/ip_address
or then again (added by ZC)
- dhcp-host=machine_name,ip_address
Numerous hostnames can be utilized with one IP address by adding extra [/hostname] areas.
For instance:
- address=/zinc/192.168.1.30
- address=/zirconium/zr/192.168.1.31
or on the other hand (added by ZC)
- dhcp-host=zinc,192.168.1.30
Or on the other hand completely qualified:
- address=/zinc.your_domain.com/192.168.1.30
(alter by ZC): An extra choice is to have Restart Dnsmasq DD WRT perused an ADDITIONAL hosts record (for the individuals who utilize the hosts strategy for promotion impeding) utilizing this choice from the DNSMasq documentation:
- # On the off chance that you don’t need dnsmasq to peruse/and so on/has, uncomment the accompanying line.
- #no-has
- # or on the other hand assuming that you believe it should peruse another document, as well as/and so forth/has, utilize this.
- #addn-hosts=/and so on/banner_add_hosts
To have DNSMasq naturally attach the area name when a solicitation is served, add the “extend has” choice and guarantee the space name is set either in the extra choices or in the DD-WRT web interface.
3) Creating static leases
Static leases from Administration->Services->DHCP Server
You recently hit “add”, and type them in. You really want to “save” settings at the lower part of the page (Duh). What I could do without about this technique is:
- If you would rather not tie MAC addresses with IPs then you need to utilize a phony MAC address on this structure, in light of the fact that the information doesn’t save without a MAC address
- If you really want to enter a considerable lot of these, it gets dreary
(alter by ZC): A substitute technique for static leases is to utilize the “dhcp-have” strategy for addresses above, yet add MAC addresses for those that need it, e.g.:
- # This passage is essentially a static DNS address, extraordinary for planning print servers, and so on to names
dhcp-host=zinc,192.168.1.30 - # This passage appoints the given IP address to the MAC address for static IP addresses
- # Note that the IP address recorded doesn’t need to be in the DHCP range given, simply on the equivalent subnet
- dhcp-host=11:22:33:44:55:66,zinc,192.168.1.30,infinite
4) dnsmasq wrapper
This arrangement works for me, as I like to have a bigger/and so forth/has document and along these lines the startup order arrangement isn’t great. By the Restart Dnsmasq DD WRT overwrites the host document, when you static leases.
(alter by ZC): Option “addn-has” functions admirably here also for utilizing an extra, enormous hosts record
What it does:
- The Script is a covering around dnsmasq with a little assistance of mount – o tie.
- Once it is snared and DD-WRT needs to restart dnsmasq the content is executed all things being equal, and adds a few lines to the created/and so forth/has thereafter it executes the genuine dnsmasq. At last it reinstalls the covering.
You need to put the content some place and placed it in to rundown of orders executed at bootup. Then change the factors at the arrangement area. Let dnsmasq and tmp immaculate. The hostfile is a record in/and so on/has design. Yet, the age of/and so on/hosts could be changed as you like. like. Tinker a piece in the Section “$0” = “$dnsmasq”.