DNSmasq resolution for Captive Portal

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
voiajor
DD-WRT Novice


Joined: 19 Mar 2007
Posts: 24

PostPosted: Sun Jun 01, 2008 21:11    Post subject: DNSmasq resolution for Captive Portal Reply with quote
I have DNSmasq set up to act as DHCP and DNS servers. DHCP works fine, handing out a static lease to a server on the LAN and handing out IPs to wireless clients.

In the DNSmasq DNS options box, I added the line: address=/#/192.168.0.253 (the address of the web server). OK. All lookups from clients on the LAN resolve to 192.168.0.253. Great. I also have HTTP redirect set to forward all web traffic to the web server.

My question might seem a bit silly. I must be missing something simple. Instead of running an intercept proxy, I've set up DNSmasq to resolve all requests to my server IP. The web server computer has the firewall on it, so I don't need to do any filtering on the router.

So why if I go to a web browser and type in: http://www.dd-wrt.com (or anything, like http://blah.blah) that the browser will go to my web server correctly, but if I try something like: http://www.dd-wrt.com/phpBB2.html the browser will give me an error back? It's ONLY when the browser tries to go to a page on a domain that I have a problem. I get an error back that the site can't be resolved. Clearing the web cache and history does nothing.

I've been playing with getting this work for a few months now. I MUST point out that there is NO internet here, just a LAN where clients connect and are directed to a web server. Either the router or the machine running the web server has to run a name server.

I never thought it would be THIS hard to set up. Sad
Sponsor
deed02392
DD-WRT Novice


Joined: 25 Sep 2007
Posts: 8

PostPosted: Wed Apr 04, 2012 18:57    Post subject: Reply with quote
Silly person, of course you're getting an error - unless you have that file (/phpBB2.html) present at that address on YOUR server, you're going to get a 404!

To resolve this, you'll simply have to set up your server to redirect all URI queries to your web servers index page, perhaps with .htaccess rules if you're on Apache or whatever else if you're not.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum