But i can't to understand how block all sites with weburl in /etc/firewall.user
I have 2IP. 192.168.1.5 & 192.168.1.10
For 192.168.1.5 i must block all sites but in white list need example google.com
For 192.168.1.10 i must block facebook.com but free to other sites.
If i do:
Code: Select all
iptables -I FORWARD -p tcp --dport 80 -j DROP
iptables -I FORWARD -p tcp --dport 8080 -j DROP
iptables -I FORWARD -p tcp --dport 443 -j DROP
iptables -I FORWARD -p tcp -d www.google.com.ua --dport 80 -j ACCEPT
But i need use weburl. And when i do:
Code: Select all
iptables -I FORWARD -p tcp --dport 80 -j DROP
iptables -I FORWARD -p tcp --dport 8080 -j DROP
iptables -I FORWARD -p tcp --dport 443 -j DROP
iptables -I FORWARD -m weburl --contains "google.com" -j ACCEPT
Code: Select all
iptables -I FORWARD -m weburl --contains_regex "*" -j DROP
iptables -I FORWARD -m weburl --contains "google.com" -j ACCEPT
Code: Select all
iptables -I FORWARD -m weburl --contains_regex "*.*" -j DROP
iptables -I FORWARD -m weburl --contains "google.com" -j ACCEPT
Code: Select all
iptables -I FORWARD -m weburl --contains "*" -j DROP
iptables -I FORWARD -m weburl --contains "google.com" -j ACCEPT
Can you help me with iptables rules?