Answer the question
In order to leave comments, you need to log in
Why doesn't the url blocking rule work?
You need to block the youtube url, there is an ubuntu 16 gateway, there is a rule on it in iptables:
iptables -A FORWARD -m string --string "youtube.com" --algo kmp --to 65535 -j DROP
Answer the question
In order to leave comments, you need to log in
Probably because you need to block youtube, and the rule says --string "vkontakte.ru" ? :-)
So?
iptables -A INPUT -m string --string "youtube.com" --algo kmp --to 65535 -p tcp --dport 80 -j DROP
iptables -A OUTPUT -m string --string "youtube.com" -- algo kmp --to 65535 -p tcp --dport 80 -j DROP
AND for https
iptables -A INPUT -m string --string "youtube.com" --algo kmp --to 65535 -p tcp --dport 443 - j DROP
iptables -A OUTPUT -m string --string "youtube.com" --algo kmp --to 65535 -p tcp --dport 443 -j DROP
UPD: I checked, it always goes to https, the last two rules are enough :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question