3

i'm setting up a testing environment in my office and configured a router flashed with dd-wrt to be my dns. I configured the domain name in the router to mydomain.com, through Setup >> Basic Setup >> Optional Settings. I also have a web server with the hostname configured to www through Services >> Services >> Services Management >> DHCP Server >> Static Leases, added an entry like this:

[MAC Address]      [Host Name] [IP Address]    [Client Lease Time]

##:##:##:##:##:6D  www         192.168.1.156   1440

(#'s are just placeholders)

then, In the Services >> Services >> Services Management >> DHCP Server >> DNSMasq >> Additional DNSMasq Options section, I wrote the following:

address=/www/192.168.1.156

I also configured port forwarding to redirect the traffic heading to port 80, to go to the same IP address (192.168.1.156). This way, I can access www.mydomain.com in any browser in my LAN, and the page I want will be served. How can I get mydomain.com to be mapped to the same IP? this is, How can i get my page to respond to a mydomain.com request the same as a www.mydomain.com request?

I have both DNSMasq and Local DNS services enabled.

Sorry for my noob question, and thanks in advance!

Throoze
  • 201
  • 3
  • 11
  • Adding the `address=/www/192.168.1.156` is unnecessary. All entries added to the static leases automatically end up in the router's DNS. In fact, IIRC, this option is supposed to be given a fully qualified host name or domain, so it's likely not even working (as intended). – phemmer Jul 31 '12 at 00:37

1 Answers1

3

The address option will accept fully qualified domain names.

address=/mydomain.com/192.168.1.156
Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • I already tried your suggestion. But, godaddy already has `mydomain.com` mapped to an IP, so for some reason, the router doesn't override this entry... is there any other thing that is needed to be done to override external DNS's? does the rules need to be written in certain specific order?? thanks for your help! – Throoze Jul 30 '12 at 23:39
  • @Throoze I'd suspect a typo or something similar. Order doesnt matter, and `address=` does override public dns. They even advertise using this feature to black-hole internet ads by doing something like `address=/double-click.net/127.0.0.1`. Under `setup` -> `basic setup`, do you have `Use DNSMasq for DNS` set? – phemmer Jul 31 '12 at 00:35
  • @Patrick:Yes, it is set. I just tried again, and it worked! I must have skipped something the last time.... sorry, and thanks for your answer and your time! – Throoze Jul 31 '12 at 12:44