Redirect to a Notice board when link is down

How can I redirect all the http traffic to a specified URL, when my internet link is down or during any maintenance.

How about using Netwatch to change your gateway?

I dont have any other second link. :frowning:

Ah - sorry… then mark and mangle and use dst-nat and packet-mark to force traffic to a specified IP.

Hi GWISA,
Am new to MT ,Can youplease give us more details how to do it.I will be gretaful.

Is it possible to redirect to a local html page (on the Hotspot router) when the ISP link is down? I would like to send users to a page that says “please wait” when the link goes down temporarily.

Thanks!

You actually can’t do that because the clients can’t resolve DNS when your link is down (well except for cached entries). Since you can’t put a wildcard static entry in the Mikrotik DNS server, the clients’ web browsers will never even attempt an Http transaction.

If you do have another machine (Linux/Windows) at that location, there would be a solution.
I have thrown together a small “fake DNS server” some time ago. It should be on the forum somewhere, I suppose?! (Don’t remember actually.) This fake DNS daemon can be configured to answer every single dns request (for A records) with the same (configurable) ip address.

Then you could redirect your DNS requests to this fake DNS server while your internet connection was down (using netwatch) and redirect all requests to a local website informing your users.
Be aware that configuring a webserver for such a “wildcard message” requires some attention (things like host header names for HTTP/1.1, 404 error pages etc.)…

Best regards,
Christian Meis