News: This forum is now permanently frozen.
Pages: [1]
Topic: captive portal intercepts IP-s only -- not URL-s  (Read 982 times)
« on: November 01, 2014, 23:37:14 »
mbush *
Posts: 3

Hi,
A total n00b here, pls be kind  Wink
I have a HD install. I do not have the WAN connected to internet. I will serve only the local content on the WiFi HotSpot.
My LAN IP: 192.168.1.1.
From the WLAN (IP range 192.168.3.100-199 + my 192.168.3.100 defined by MAC reservation), I can get to the captive portal home page if I type in the browser an IP (eg, 4.4.4.4). -- I get redirected to http://192.168.3.1:8000/?redirurl=http%3A%2F%2F4.4.4.4%2F
But if I type a URL (eg, something.com), then "can't find the server".
What am I missing? Why is captive portal not intercepting URL-s, but only IP-s?
Perhaps it is because no DNS can be accessed.
If this cannot be fixed without a DNS, then... if I understand it correctly, I also cannot redirect the traffic manually on the thttpd web server (like it could be done with Apache rewrite)

My firewall rules ("pass"):
TCP            *     *     *                   80 (HTTP)
TCP/UDP    *     *     *                   53 (DNS)
TCP           *     *     192.168.3.1  8000

Sure you have some good answers to my simple questions :-)

Thanks in advance!
« Last Edit: November 01, 2014, 23:42:28 by mbush »
« Reply #1 on: November 02, 2014, 03:00:48 »
Lee Sharp *****
Posts: 517

You do not understand how networking works...  When you type www.google.com into the web browser, the first thing that happens is the IP stack goes, who si www.google.com?  That requires a DNS lookup to say "Google is 173.194.115.128" and then the bowser can ask 173.194.115.128 for the web page.  When you have no DNS, it never gets to the point of asking for the page, so captive portal does not enter into it.
You will need to set up a global DNS that answer every query with an outside IP address so CP can grab it and redirect you to the page.  Alternatively, you can redirect everyone to your web page directly.
« Reply #2 on: November 02, 2014, 09:26:06 »
mbush *
Posts: 3

Thanks
How can I "redirect everyone to [my] web page directly"?  could the redirection be done somehow in m0n0wall settings?
Looking forward to get some practical suggestions
« Last Edit: November 02, 2014, 09:32:41 by mbush »
« Reply #3 on: November 03, 2014, 18:05:33 »
Lee Sharp *****
Posts: 517

You would still need DNS.  For ANYTHING, you will need DNS.  In your DNS set a DNS wildcard that all lookups return 192.168.0.25 (Or whatever your webserver is.)  It will throw cirt issues on https redirect...  But it will get you there.

So, pick some DNS software, (bind for example) and set it up with a wildcard.
« Reply #4 on: November 03, 2014, 21:04:43 »
mbush *
Posts: 3

Thanks
And it is probably not possible to install the Bind on m0n0, is it? (no shell access...)
It is such a great little thing  -- the m0n0. Pity I cannot use it for my setup.  :-(
Thanks for your answers!
« Reply #5 on: November 04, 2014, 19:18:48 »
Lee Sharp *****
Posts: 517

M0n0wall is a purpose built firewall.  It does that very well.  But it does not go beyond that.  In your case you might look at pfSense to see if it can be made to do what you need.
« Reply #6 on: November 06, 2014, 06:32:52 »
Lee Sharp *****
Posts: 517

FYI, this may be a better fit for what you are looking for.

http://librarybox.us/
 
Pages: [1]
 
 
Powered by SMF 1.1.20 | SMF © 2013, Simple Machines