Community discussions

MikroTik App
 
richedav
Member Candidate
Member Candidate
Topic Author
Posts: 114
Joined: Mon Dec 13, 2010 12:13 am

HotSpot/ Captive portal without internet

Tue Jul 19, 2011 5:40 pm

Hi

Im just setting up a Hotspot that will simply direct customers to a advert page - no login process, simply sends them to a page on a local server.

Im seeing a problem though in that because the DNS server on the Mikrotik cannot resolve what the customer is asking for, it times out and the user does not see the page. If you type an IP address into the web browser, then the hotspot takes over and end user goes to the correct page.

Is there any way of adding a catch all DNS entry on the mikrotik, so that regardless of what page the user is trying to resolve, mikrotik returns a entry which will cause them to go to the web page. I cannot add a forwarder DNS Server to resolve these as the site has no internet connection.

any clues, hints and tips?
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: HotSpot/ Captive portal without internet

Tue Jul 19, 2011 5:58 pm

http://wiki.mikrotik.com/wiki/Manual:IP ... NS_Entries
Make a wild card static IP entry. '*' matches all characters.
 
richedav
Member Candidate
Member Candidate
Topic Author
Posts: 114
Joined: Mon Dec 13, 2010 12:13 am

Re: HotSpot/ Captive portal without internet

Wed Jul 20, 2011 5:16 pm

Cheers Fewi

This seems to fit my needs, but its taking precedence over the other static dns entries I have added.

Not been upto date with RegExp, could someone explain how to build the following in regex ?

any text with the excetion of string ending .local

So all .local will be excluded from the regex query, whilst all other domains will be returned with the IP address i specify.

Many thanks.
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: HotSpot/ Captive portal without internet

Wed Jul 20, 2011 5:28 pm

Rather than futz around with negative lookaheads it would be easier if you made your other static entries regex as well - regex entries are evaluated first, but they are evaluated in order top to bottom. If you simply convert your existing records into regexes by adding a character class (e.g., using [aA]bc.com instead of abc.com) without changing functionality you should be up and running.
 
richedav
Member Candidate
Member Candidate
Topic Author
Posts: 114
Joined: Mon Dec 13, 2010 12:13 am

Re: HotSpot/ Captive portal without internet

Wed Jul 20, 2011 6:54 pm

As always, many thanks

Enquired about a MT training course today so will hopefully soon become less annoying

Who is online

Users browsing this forum: No registered users and 82 guests