OpenWrt Forum Archive

Topic: Redirect Blacklist but allow Whitelist

The content of this topic has been archived on 27 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Any suggestions on the best method to block and redirect all web sites to a specific company website except a white list of 5 other allowed sites..?

(Last edited by SpeedyP on 21 Feb 2017, 13:31)

dnsmasq + DNS hijacking.

Use the Adblock package with specific white and black lists.

Comitizer wrote:

Use the Adblock package with specific white and black lists.

Adblock doesn't allow to redirect web sites.

This is what I need to achieve, the big question is how..?

if (requested URL = qwerty.com or abc.com or xyz.com){
   allow
}else{
   redirect to 192.168.0.100
}

SOLVED:

All it took was a few entries in the dnsmasq.config

Simple and easy... when you know how..!

The discussion might have continued from here.