block adult website for specific ip

Hello to all

Are three days that I read guides but have not been able to find a solution to my problem.

I have to create a network that blocks certain websites depending on the user’s local ip. For example:

  1. 192.168.88.1 - 192.168.88.20 ( Block all site, expeat http://www.example.com ) I have alreasy made this step and all working good
  2. 192.168.88.20 - 192.168.88.200 ( Block only porn sites and social ), i have try opendns ad work perfect but how i can switch the dns for specific ip connected ( see 3 step )
  3. 192.168.88.200 - 192.168.88.254 ( Block nothing ) If i sue open dns how i can’t block adult site and social for this ip range?

Thanks to all.

12-07-16 09:57

i have try:

add chain=dstnat action=dst-nat to-addresses=208.67.222.123 to-ports=53 protocol=tcp dst-port=53 src-address=192.168.88.20-192.168.88.200
add chain=dstnat action=dst-nat to-addresses=208.67.222.123 to-ports=53 protocol=udp dst-port=53 src-address=192.168.88.20-192.168.88.200

but don’t work.

Your rules seem ok. Do you see packet counters increasing on those rules? Did you try to restart client computer to make sure that it does not use previously cached records?

where to apply this rule in Filter or Mangle ???