0

I recently got a router that has dd-wrt firmware installed into it. I'm running a HTTP server behind that router, and as it has a NAT, I have set the appropriate port forwardings.

I also have a domain name registered, let's say example.org, that points to my public IP, let's say 123.123.123.123 When accessing it from outside the LAN, everything works fine. However, when typing example.org to the browser INSIDE the LAN, it seems to resolve to the private IP of the router, 192.168.1.1. Well, 123.123.123.123 and 192.168.1.1 point to the same device of course, but the port forwarding doesn't work, when accessed from the IP 192.168.1.1. If I type 123.123.123.123 to my browser, it works.

The problem seems to be that the DNS server that comes with dd-wrt translates the public IP to the private. Using dig confirms this. This:

mycomp:~ me$ dig example.org

; <<>> DiG 9.8.3-P1 <<>> example.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29597
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;example.org.           IN  A

;; ANSWER SECTION:
example.org.        0   IN  A   192.168.1.1

;; Query time: 7 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Fri Aug  1 15:40:17 2014
;; MSG SIZE  rcvd: 42

versus this: (asking directly from an outside [here, Google's] DNS server)

mycomp:~ me$ dig @8.8.8.8 example.org

; <<>> DiG 9.8.3-P1 <<>> @8.8.8.8 example.org
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17481
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;example.org.           IN  A

;; ANSWER SECTION:
example.org.        59  IN  A   84.248.86.142

;; Query time: 249 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri Aug  1 15:27:36 2014
;; MSG SIZE  rcvd: 42

So it seems that dd-wrt meddles with the DNS query. How to configure it not to do this?

2
  • Btw. I am, of course, able to temporarily remedy this on a single client-computer basis by disabling automatic DNS and setting the DNS server to some server outside the LAN, for example 8.8.8.8.
    – GolDDranks
    Commented Aug 1, 2014 at 13:23
  • possible duplicate of DD-WRT: dnsmasq headaches with static hosts Commented Oct 15, 2014 at 4:48

1 Answer 1

0

See this comment for the answer. I have had all of these issues and have it resolved with the first set of entries of my comment.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .