Community discussions

MikroTik App
 
hotspotsolutions
Member Candidate
Member Candidate
Topic Author
Posts: 119
Joined: Thu Dec 16, 2004 1:48 pm

HotSpot edirect When No Internet Connection

Tue Aug 23, 2005 1:37 pm

Hi,

Ok So currently when we have an established internet connection, and a hotspot user tries to access the internet, gets redirected to the login page.

Thats fine,but if the internet connection is down, you simply get a page cannot be disaplyed, no redirect.

I understand why that is, but is there any way around this, so I can at least say there is no net conection currently?
 
cmit
Forum Guru
Forum Guru
Posts: 1547
Joined: Fri May 28, 2004 12:49 pm
Location: Germany

Tue Aug 23, 2005 2:26 pm

The reason for the error is that name resolution doesn't work, which has to be done before the browser even sends out the http request (which then is intercepted by the hotspot and the user redirected to the login page). This part is clear...

The only way around the problem you describe which I can think of right now would involve having at least another server reachable from the hotspot network. You could install a "fake" dns server there that is replying with a fixed ip address for all A-record dns requests (regardless of the name requested).
Then run a webserver on this ip address stating "Our net connection is currently not available.".

Last step would be to add scripts to your hotspot that detect availibility of you internet connection (for example, use the netwatch tool) and redirect all dns request to your "fake dns server" when your uplink is more like a "down-link" ;)

Regarding the "fake dns server": If you don't have anything at hand the easiest/cheapest way I can think of right now would be a LinkSys WRT54G with a custom Linux firmware. This could be the fake dns server and the webserver serving your "we are offline" page...
 
hotspotsolutions
Member Candidate
Member Candidate
Topic Author
Posts: 119
Joined: Thu Dec 16, 2004 1:48 pm

Tue Aug 23, 2005 3:02 pm

hey thanks for that, I dont think we will go to that trouble to let them know, I guess they will just have to deal with it:)
 
User avatar
infomate
Member Candidate
Member Candidate
Posts: 114
Joined: Sat May 21, 2005 2:30 pm
Location: Dumaguete City, Philippines

Tue Aug 23, 2005 3:03 pm

Christian,

isnt it that the MT box can be setup with its own DNS server. with netwatch we can easily detect our internet connectivity by pinging, lets say the ISP-GW. Can we not just do a mangle to trap DNS request and redirect it to a page hosted on the MT box. (just a thought) :?

Maybe somebody else have a workaround.

Robert S.
 
cmit
Forum Guru
Forum Guru
Posts: 1547
Joined: Fri May 28, 2004 12:49 pm
Location: Germany

Tue Aug 23, 2005 3:24 pm

The problem is that the "fake" dns server in my example has to answer dns requests for ALL possible names (i.e. for http://www.google.com, http://www.microsoft.com, my-home.dnydns.org, heise.de, ...). This cannot be achieved with a standard dns server (and not with the one in MikroTik RouterOS) - this behaviour wouldn't make much sense in a "normal" environment after all...

Who is online

Users browsing this forum: GoogleOther [Bot], MarkusT and 135 guests