Community discussions

MikroTik App
 
User avatar
vetusa2
Member Candidate
Member Candidate
Topic Author
Posts: 119
Joined: Sat Jun 18, 2011 8:24 pm

let mikrotik run an ext webserver instead of internet access

Thu Dec 08, 2011 4:18 am

while eating my dinner i asked myself a question "is it possible to let mikrotik be a gateway for an internal webserver only?"

in simple words i want to broadcast a webserver as a hotspot in my area without offering internet access....so if it is possible then how?

the webserver ip is 10.0.0.10
 
User avatar
vetusa2
Member Candidate
Member Candidate
Topic Author
Posts: 119
Joined: Sat Jun 18, 2011 8:24 pm

Re: let mikrotik run an ext webserver instead of internet ac

Thu Dec 08, 2011 9:25 pm

all i want is when people join my network via wireless access that is controlled by mikrotik server,when they open there browser mikrotik direct them to the webserver with or without a login page
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: let mikrotik run an ext webserver instead of internet ac

Thu Dec 08, 2011 9:33 pm

Sure. Just run a normal DHCP server on the network announcing the router for DNS, add a wildcard entry for DNS that resolves all host names to some IP address, add a Hotspot, and redirect to the web server as a login page.

Adding static DNS: http://wiki.mikrotik.com/wiki/Manual:IP ... NS_Entries
External login pages: http://wiki.mikrotik.com/wiki/HotSpot_e ... login_page

That's it.
 
User avatar
vetusa2
Member Candidate
Member Candidate
Topic Author
Posts: 119
Joined: Sat Jun 18, 2011 8:24 pm

Re: let mikrotik run an ext webserver instead of internet ac

Fri Dec 09, 2011 1:21 am

can it be done without the existence of external router or external dns?

i mean dhcp can use pool range 10.0.0.0/24 only ,also static dns can be used and no need to creat a hotspot login pages i guess only a redirect html page of free trial with direct link to to 10.0.0.10 in mikrotik's ftp

what do you think ?
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: let mikrotik run an ext webserver instead of internet ac

Fri Dec 09, 2011 1:50 am

As I already said if you have wildcard DNS entries you can do without an external DNS server.

You do need the Hotspot so you can redirect requests for any web resource on any host that a client could possibly request. Alternatively your web server would have to take care of that. Remember, a client could request absolutely anything. Web servers tend to only answer requests for resources they actually have. The Hotspot is a neat way to work around that.

The Hotspot will always show a login page. 'Login page' refers to the page the router shows to let people log in in its process. That doesn't mean you actually have to let people log in on that page, or even have a form for logins. It just refers to the login.html that the Hotspot is going to want to serve - you can put anything into that file that you want. I have no idea how FTP comes into this, or what trials have to do with this. If everything is self contained what are you having people try?
 
User avatar
vetusa2
Member Candidate
Member Candidate
Topic Author
Posts: 119
Joined: Sat Jun 18, 2011 8:24 pm

Re: let mikrotik run an ext webserver instead of internet ac

Sat Dec 24, 2011 4:55 pm

thank you fewi "I HAVE DONE IT!"

just came back to tell you and without too much talking and in short words

steps are:
1- a full working primary mikrotik hotspot server to handle all http requests from a slave mikrotik server with enabled (ap bridge) b/g mode wireless cards with automatic dhcp enabled.
2- a full working local webserver connected to the slave/secondary mikrotik (hotspot server with special redirect alogin.html page to a local html webserver).
3- (resolved dns done by first server) +wild card on secondary server to feed it with a chosen fake domain names just for fun ,one with www and one without
4- add the ip addresses of the gateway manually (of the primary mikrotik server) on the secondary server.
5-added a hotspot user profiles on the slave/secondary mikrotik server with advertise time out link to my external webserver to force people on each domain request they type to be redirect to the external webserver.

there are some conditions:
the 2 mikrotik hotspots should not be equal in ip ranges (ex. one should be 192.168.0.1 other one should be 10.0.0.0)

the question is why i did all that?
the answer :to host a protected wireless movies/music/programs/tv webserver without effecting the internet access on the primary mikrotik server and to put less load on it from users requesting fast downloading movies/music/programs.

*i faced a big challenge on how to redirect people to the external webserver through the secondary mikrotik hotspot without internet access
also i faced a big challenge on redirecting any requested domain names to the external local webserver

---------------------
so at the end i want to know how to redirect people (as soon as they open their web browsers) to my local external webserver without isp service after they connect to my wireless slave/secondary mikrotik server!

Who is online

Users browsing this forum: No registered users and 37 guests