Blocking 443 traffic in iptables or squid (Transparent proxy) is possible with below rule
Iptables Rule to Block YouTube in IPTABLES
iptables -I FORWARD -p tcp --dport 80 -m string --string 'youtube.com' --algo bm --to 65535 -j DROP
iptables -I FORWARD -p tcp --dport 443 -m string --string 'youtube.com' --algo bm --to 65535 -j DROP
Above rules will block entire traffic destine to 443 port but you can apply same rule on particular single ip, range of ips or complete network.
To Apply Same Rule on Single IP Address or Subnet
iptables -I FORWARD -p tcp --dport 443 -s 192.168.2.10 -m string --string ‘youtube.com’ --algo bm --to 65535 -j DROP
You can also block "facebook", "twitter" or other https websites with above method.
Iptables Rule to Block YouTube in IPTABLES
iptables -I FORWARD -p tcp --dport 80 -m string --string 'youtube.com' --algo bm --to 65535 -j DROP
iptables -I FORWARD -p tcp --dport 443 -m string --string 'youtube.com' --algo bm --to 65535 -j DROP
Above rules will block entire traffic destine to 443 port but you can apply same rule on particular single ip, range of ips or complete network.
To Apply Same Rule on Single IP Address or Subnet
iptables -I FORWARD -p tcp --dport 443 -s 192.168.2.10 -m string --string ‘youtube.com’ --algo bm --to 65535 -j DROP
You can also block "facebook", "twitter" or other https websites with above method.
No comments:
Post a Comment