How to create iptable default rule for all host, which hosts iptables don't contain in rules?

Hello, all!
To use iptable and ipset created black and while list.
iptables -I FORWARD -m set --match-set blacklist src,dst -j DROP
iptables -I FORWARD -m set --match-set whitelist src,dst -j ACCEPT
How to redirect to another ip destination host if this host not in black or white list?

Example what I mean: user trying to open but not in blacklist or whitelist the firewall has to tredirect destination host to another server and user will see in browser typed url and information text: This site not in white list.

Thank you for your asnwers.

1 Like