Block all excep one domain

Good morning, i just buy a mikrotik routerboard 951ui-2hnd, and i want to limit the Wifi Connection to deny all websites except one of them.

I was reading about it, and i found that you could do it by webproxy or firewall. Something like that:

/ip proxy access
add dst-host=www.google.com* action=allow
add dst-host=.google.com action=allow
add dst-host=google.com* action=allow
add dst-address=0.0.0.0/0 action deny redirect-to=google.com

But i also read that this don’t work for https directions.

Could someone help me? :slight_smile:

This only works for https connections if the browser is directly using the router as a proxy server. If you’re trying to transparently redirect the traffic to the proxy, it won’t work right because SSL will detect the presence of the proxy and give the user a certificate warning.

If you have a website that you can upload a PAC file to, then you can try your hand at setting up WPAD to automatically assign proxy settings to your clients’ browsers. This website covers the concepts very well:
http://findproxyforurl.com/

Well, what i want is to offer a WiFi network for my users. But i need that this network only allows browsing in a domain, and redirect all url that you try to that domain.

If you don’t care about SSL warnings any time a user tries to go to an ssl-enabled site, then you can get the job done with transparent redirection as you’ve asked.

The easiest thing to do would be to set up hotspot, set the login URL to be whatever website it is that you want people forced to, and then allow that site in the walled garden.

ok, i wil try with that. Thanks! :smiley: