Community discussions

MikroTik App
 
Ivoshiee
Member
Member
Topic Author
Posts: 471
Joined: Sat May 06, 2006 4:11 pm

How to make hotspot active when internet connection is down?

Tue Jul 17, 2012 2:30 pm

I am a bit stuck with a hotspot not trapping http sessions in case when internet connection of MT box is down.
In case of the internet being down the client web browser will try to connect a web page, will fail because the DNS can not be resolved and client will get just a "not found" error page. It is a bit bad because the hotspot will not get called. When the DNS can be resolved the hotspot will kick in and it will do its magic and everyone is happy.

How to make the hotspot active when the internet connection is down?

ROS v5.14, RB/411U
 
jandafields
Forum Guru
Forum Guru
Posts: 1514
Joined: Mon Sep 19, 2005 6:12 pm

Re: How to make hotspot active when internet connection is d

Fri Jul 20, 2012 4:43 pm

I am a bit stuck with a hotspot not trapping http sessions in case when internet connection of MT box is down.
In case of the internet being down the client web browser will try to connect a web page, will fail because the DNS can not be resolved and client will get just a "not found" error page. It is a bit bad because the hotspot will not get called. When the DNS can be resolved the hotspot will kick in and it will do its magic and everyone is happy.

How to make the hotspot active when the internet connection is down?

ROS v5.14, RB/411U
The DNS is the problem, as you have seen. It must resolve to IP before it redirects. Of course, if the Internet is down, then your users are going to get a page not found even if they are able to login, once they try to access the Internet... So, why does it matter? Either way, they can' access the Internet if the Internet connection is down.

If you REALLY want it to work, though, you need to setup a DNS server that can return SOMETHING/ANYTHING when a lookup fails... and then use that DNS server instead of whatever you are currently using.
 
Ivoshiee
Member
Member
Topic Author
Posts: 471
Joined: Sat May 06, 2006 4:11 pm

Re: How to make hotspot active when internet connection is d

Fri Jul 20, 2012 10:13 pm

The DNS is the problem, as you have seen. It must resolve to IP before it redirects. Of course, if the Internet is down, then your users are going to get a page not found even if they are able to login, once they try to access the Internet... So, why does it matter? Either way, they can' access the Internet if the Internet connection is down.
It should be advisable to have them browse some Walled Garden local page instead of getting an error.
If you REALLY want it to work, though, you need to setup a DNS server that can return SOMETHING/ANYTHING when a lookup fails... and then use that DNS server instead of whatever you are currently using.
Yes, but how to capture the DNS time-out and send "something back" to the clients?
 
User avatar
TheWiFiGuy
Member
Member
Posts: 351
Joined: Thu Nov 24, 2011 7:26 pm
Location: UK

Re: How to make hotspot active when internet connection is d

Sun Jul 22, 2012 12:07 am

write a script to check if the net is down. If it is, then create a catch all dns entry using regex, just remember to take it off once the internet comes back on.
----------------------
Mikrotik Consultant.
MTCNA, MTWCE, MTCTCE, MTCRE, MTCINE
 
ibermi
just joined
Posts: 22
Joined: Mon Dec 13, 2010 12:26 pm

Re: How to make hotspot active when internet connection is d

Wed Sep 19, 2012 2:17 pm

write a script to check if the net is down. If it is, then create a catch all dns entry using regex, just remember to take it off once the internet comes back on.
The problem is that if you use the regex DNS, for example. '*' Works well, unless it is the example URL: www.google.com / search, after '/' and a word you get the error 404. Is there a regex expression to solve this in static DNS?
thanks
miguelbatista at ibersystems.es
Experto en redes WiFi y enlaces WiFi.

Facebook: @Ibersystems
Twitter: @Ibersystems

Expert in Wireless, Hotspots, Linux and Radius Servers

Who is online

Users browsing this forum: Google [Bot], heidarren, jerryroy1, mlow and 126 guests