Hotspot doesn't open if the internet is down

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 ,

try add your router ip address to the dns settings

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…)

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 ,

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.

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 ,

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.

I see ,
can I send you a private message ?
asking more in-deep questions?

Sadly, they turned off PMs on the forums.

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 ,

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/linux-networking-3/dns-bind-same-ip-for-all-requests-631085/
http://serverfault.com/questions/396958/configure-dns-server-to-return-same-ip-for-all-domains
http://serverfault.com/questions/606987/configuring-bind9-to-resolve-all-queries-to-the-same-ip