Small Web Server on RouterOS, please.

I want to very basic website on every CPE so if the internet is offline to display a troubleshooting page or what else I would like to display. Greatly appreciated if this could be a feature in 6.x.

Install the Hotspot feature. Edit the login.html shown to users when they aren’t authenticated to show whatever you want it to show. Use scripts to turn on the Hotspot when the CPE is offline, and turn it back off when it comes back online.

Yeah that works but I think thats a work around. I was looking for Mikrotik to implement the feature the way I think it should be done. Thanks for your reply.

I seriously doubt they will ever put a webserver into their router. As long as your own network is up, you could redirect clients to your own webserver.

The hotspot idea is not a bad idea at all… regardless of being a “workaround”, once you get it working the way you want it to, just set it, copy it, and forget it.

Even with a webserver, it won’t help in situations like computer virus, bad computer settings, unplugged cable, bad Mikrotik power supply, etc, etc, etc…

If a customer’s computer is in good enough condition to get TO the website on the routerboard, but cannot get internet through it… what possible troubleshooting tips can you give them? It’s most likely a problem beyond their control if they can get a website to pull up from the routerboard, but not from beyond that…

I will just keep hoping.

They don’t have to, it’s already there. :wink: All that’s needed is to add one simple No thanks, I don’t want RouterOS default webpage, just serve files from my directory please checkbox to WinBox.

As long as your own network is up, you could redirect clients to your own webserver.

The device may be as well CPE unit, i.e. when the connection fails, it doesn’t have access anywhere, except to customer’s own network.

If a customer’s computer is in good enough condition to get TO the website on the routerboard, but cannot get internet through it… what possible troubleshooting tips can you give them?

“Please don’t panic, we have good monitoring and someone is probably already working on fixing your problem.” / “If you see this page for more than two weeks, please give us a call at 123456789 if you want to see any other page ever again” / etc…

It isn’t quite that simple. You need to recognize that the CPE is down. Then you need to redirect all DNS to it so it can serve as a resolver, and it needs to resolve all requests to itself via a wild card. Then it needs to either have a proxy that really listens to the request and instead fetches your local page, or needs to have a specialized web server that can answer any request - after all people are unlikely to specifically ask for your error page.

You can do all that already with the built in tools, combined with a Hotspot. You’re asking for a check box that combines all those steps into one. Fair enough, if they want to implement that more power to you. Personally I’d argue that RouterOS is powerful precisely because it doesn’t have “click here and all kinds of magic happens” checkboxes. This problem is solvable more or less right now already, but you’ll have to build it together from the bits and pieces.

Edit: just to be more explicit - what you’re asking for already exists in RouterOS. Whatever solution Mikrotik comes up with would have to recognize failure, then perform DNS redirects and reply spoofing, and then perform HTTP inspection and rewriting, and finally - after convincing the client that it really wants to see your error page instead of what it asked for - serve error page. That is more or less the definition of scripts enabling DNS NAT, DNS wildcards, and a Hotspot. You are just calling it a workaround because it’s not a one click solution, but whatever one click solution anyone would come up with internally would work exactly like wildcard DNS and Hotspots already do. Alternatively instead of the Hotspot you could use a proxy with a deny all rule redirecting - but that is exactly what a Hotspot does to unauthenticated users.

No skin off my nose if you implement that, but maybe it’ll be of use to someone else reading this thread.

Well, for my part I have to admit that I should have stopped after first paragraph, with rest I went too far without thinking it through.

I just wanted to say that if there’s already webserver running on RouterOS, there’s no good reason to deny user to use it for his own files too. They may be some static files for download if separate server would be overkill. Or something useful generated by RouterOS scripting. Anything…

And btw, if someone really needs it, they can already boot some Linux and create one right symlink. It’s just unnecessary extra work. I once tried to get access to Dude-generated map images this way and it almost worked, it was ruined only by files being owned by root and having 0600 permissions.

heheh, thanks that was great. I want to have website to show customers how to troubleshoot their connection.

I did complete everything for the page to be displayed. The only thing I cant do it display my webpage instead of a default mikrotik page of login.html. I want to have my own page.html.

What’s the difference between displaying myownpage.html and login.html when you can edit login.html and put the content of myownpage.html into it?

But if that’s your last hang up replace the content of the stock login.html with this:

<html><head><meta http-equiv="refresh" content="0; url=myownpage.html"></head></html>

That will issue a final redirect to the client and show myownpage.html, which you’ll have to upload to the Hotspot directory.

Thanks for the input. I know we can do this. I was just hoping I could get mikrotik to do this without a workaround. Thanks again. Anyone else have any uses for this standalone feature?

It’s not a workaround, it’s completely standard behavior. Apache also defaults to index.html, and if you want to show another page as the first one, you make a redirect.

ok thanks

When a customer has no internet. I would like to use a firewall rule to redirect customers to a webproxy. The webproxy will redirect the customer to the small webserver with a custom ste.html. I would not like to use a hotspot. Is this possible?

This is a feature asked for many times and not taken on but seriously, in WISP business the above described simple scenario is a must. How hard could it be? Using HotSpot for workaround puts unnecessary overhead on the configuration and traffic flow.

MikroTik, I truly believe that the proper way to go is to have a tiny web server. I know you have Wireless and routing and security and x86 compatibility to take care of, so you may work on the tiny web server after those.

I still say that if a customer can access a website on the CPE, but can’t get past the CPE… then it is the ISP that has a problem, not the customer… and therefore nothing for the customer to troubleshoot.

If the ISP network is up, but the ISP’s upstream is down, you can put a webserver on your network and redirect all traffic to a page on that webserver.

As for the person that wrote “please call if you see this error message for more than 2 weeks, then call us…”, what kind of ISP tells their customers to wait TWO WEEKS before calling in about internet problems???

I agree with dallas.

Very nice idea.
This can be a separate package.
I think it will be more useful then samba :wink:

Isn’t something like this possible with Metarouter / OpenWRT / Apache?

In any case…I think most folks want the router to be a secure router and not a hackable web server…

MD