Community discussions

 
David1234
Forum Guru
Forum Guru
Topic Author
Posts: 1264
Joined: Sun Sep 18, 2011 7:00 pm

Hotspot doesn't open if the internet is down

Sun May 29, 2016 10:51 pm

Hello ,
I have notice a strange problem
I'm using hotspot on my RB411
when there is an internet connection - I get the login page right away
but if the internet connection is down - the page doesn't come up
is there a way to fix this?

I want the users to get to my login page regatless if there is an internet connection or not

Thanks ,
 
flynno
Member Candidate
Member Candidate
Posts: 241
Joined: Wed Aug 27, 2014 8:11 pm

Re: Hotspot doesn't open if the internet is down

Sun May 29, 2016 10:56 pm

try add your router ip address to the dns settings
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4051
Joined: Wed May 11, 2011 6:08 pm

Re: Hotspot doesn't open if the internet is down

Mon May 30, 2016 2:44 am

Hello ,
I have notice a strange problem
I'm using hotspot on my RB411
when there is an internet connection - I get the login page right away
but if the internet connection is down - the page doesn't come up
is there a way to fix this?

I want the users to get to my login page regatless if there is an internet connection or not

Thanks ,
Client PC must generate a web request which gets redirected to the login page. If internet is down, DNS will fail, so the browser will not have any IP to attempt it's connection. You could try redirecting all DNS to an internal server that resolves EVERYTHING to the hotspot IP... If you do, then be SURE to give VERY small TTL in the replies (5 seconds...)
When given a spoon,
you should not cling to your fork.
The soup will get cold.
 
David1234
Forum Guru
Forum Guru
Topic Author
Posts: 1264
Joined: Sun Sep 18, 2011 7:00 pm

Re: Hotspot doesn't open if the internet is down

Mon May 30, 2016 6:48 am

is it difficult to do?
what will happan when the internet return?
do I need to make a script that run once every 1 min (or so) to change the DNS?

also (and most importenet) how to do this?

Thanks ,
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4051
Joined: Wed May 11, 2011 6:08 pm

Re: Hotspot doesn't open if the internet is down

Mon May 30, 2016 9:04 am

I'm not sure how to set up the DNS server to give the same answer to any query, but assuming you have a server on the LAN which you've set up this way, if it's Linux, you could configure it with an ip tables NAT rule to redirect all udp port 53 traffic to itself.

Then in the Mikrotik, configure /32 static routes for the real DNS addresses with distance=1 and the same gateway address as the default GW but add check gateway option on these routes. Then add the same /32 routes with distance=2, no check gateway, and next hop address =ip of the fake DNS server.
When given a spoon,
you should not cling to your fork.
The soup will get cold.
 
David1234
Forum Guru
Forum Guru
Topic Author
Posts: 1264
Joined: Sun Sep 18, 2011 7:00 pm

Re: Hotspot doesn't open if the internet is down

Mon May 30, 2016 8:31 pm

I only use Mikrotik RB411 device , no DNS computer\server connect to it.
so can I "create" a server on the RB ? that onky work if no internet access ?
an to redirect all the request to him?

Thanks ,
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4051
Joined: Wed May 11, 2011 6:08 pm

Re: Hotspot doesn't open if the internet is down

Mon May 30, 2016 10:47 pm

No because the built-in DNS resolver is only a proxy. You can't configure anything fancy with it like wild cards.

You could possibly install a metarouter OpenWRT image and run Bind9 on that but your router doesn't exactly have lots of spare power for this.
When given a spoon,
you should not cling to your fork.
The soup will get cold.
 
David1234
Forum Guru
Forum Guru
Topic Author
Posts: 1264
Joined: Sun Sep 18, 2011 7:00 pm

Re: Hotspot doesn't open if the internet is down

Tue May 31, 2016 9:22 am

I see ,
can I send you a private message ?
asking more in-deep questions?
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4051
Joined: Wed May 11, 2011 6:08 pm

Re: Hotspot doesn't open if the internet is down

Tue May 31, 2016 9:17 pm

I see ,
can I send you a private message ?
asking more in-deep questions?
Sadly, they turned off PMs on the forums.
When given a spoon,
you should not cling to your fork.
The soup will get cold.
 
David1234
Forum Guru
Forum Guru
Topic Author
Posts: 1264
Joined: Sun Sep 18, 2011 7:00 pm

Re: Hotspot doesn't open if the internet is down

Wed Jun 01, 2016 9:13 pm

ohhh
O.K
so let say I try to install my hotspot on x86
what do I need to do in order to be able to run a "fake" DNS server
so I will allways get the hotspot login page even if no internet is on?

Thanks ,
 
User avatar
ZeroByte
Forum Guru
Forum Guru
Posts: 4051
Joined: Wed May 11, 2011 6:08 pm

Re: Hotspot doesn't open if the internet is down

Thu Jun 02, 2016 12:32 am

so let say I try to install my hotspot on x86
what do I need to do in order to be able to run a "fake" DNS server....
If the x86 host is running RouterOS directly, then it's just a router, the same as a routerboard, so you have no advantages there.
(You might try to install an OpenWRT metarouter image on it, since an x86 should have plenty of power to do routing and a virtual host at the same time)

As for setting up a nameserver to answer all queries - google is great:
http://www.linuxquestions.org/questions ... ts-631085/
http://serverfault.com/questions/396958 ... ll-domains
http://serverfault.com/questions/606987 ... he-same-ip
When given a spoon,
you should not cling to your fork.
The soup will get cold.

Who is online

Users browsing this forum: Google [Bot] and 121 guests