Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello!
i need to block youtube, so anybody in my network can access it, i have add this lines to mi firewall script, but dont work.
${IPTABLES} -A INPUT -s 208.65.153.253 -j DROP
${IPTABLES} -A OUTPUT -d 208.65.153.253 -j DROP
${IPTABLES} -A INPUT -s 208.65.153.251 -j DROP
${IPTABLES} -A OUTPUT -d 208.65.153.251 -j DROP
${IPTABLES} -A INPUT -s 208.65.153.238 -j DROP
${IPTABLES} -A OUTPUT -d 208.65.153.238 -j DROP
Not enough info -- you're appending rules, so we need to see the rules that precede it. Post the results of # iptables -nvL (in code tags so that it's readable).
This is definitely not something you'd wanna do with iptables. You'll never be able to keep up with all the IPs. A proxy server is much better suited for this, as you'd just block "youtube.com" without having to worry about any IPs.
Having said that, you mentioned a "network" yet you posted INPUT/OUTPUT rules. If this is a network firewall you'd need to use the FORWARD chain instead of INPUT/OUTPUT. That might explain why your rules aren't having any effect.
If you host your own DNS you can "poison" your DNS by making a zone for youtube. Then point it at 127.0.0.1. Also you can do this with /etc/hosts if this is a standalone machine.
"YouTube.com owns the entire 208.65.153.0 to 208.65.153.255 range,
so you can use a firewall rule to block all TCP connections on
Port 80 (or more if you want to block everything possible) using
the CIDR of 208.65.153.0/24"
_
Last edited by internetSurfer; 02-28-2008 at 02:50 PM.
Yeah, if you are 100% positive that youtube.com only uses 208.65.153.0/24 then you should be able to cut your network clients off from it by using something like:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.