slider

Recent

Powered by Blogger.

Featured post

Share Blog Posts Automatically on Facebook,Twiiter and other Social Networks

If you think writing a blog post is over when you hit the publish button, Hello I think you should take a shower. Blog posts, (no matter h...

Search This Blog

Blog Archive

My Blog List

Text Widget

1
2
3
Navigation

Block facebook on a proxied internet with IP Proxy

Block facebook on a proxied internet with IP Proxy
Those who access internet by setting a proxy(insti proxy!!) in their browsers and want to block facebook on their computers can issue the following command as root on their linux box


iptables -I OUTPUT -m string --algo bm --string "facebook.com" -j DROP

I can't control myself from opening Facebook every now and then, when working in lab, just to see what's going on. Facebook is my biggest distraction. Hope this move will help me to concentrate on work.
By the way, iptables doesn't persist the firewall rules across restarts. So I have appended the above command to my /etc/profile file so I don't have to manually type the above command when I fresh boot my computer.
By the way the above command will block all packets that match the string facebook.com, so if you try to search for facebook.com in Google, you won't be able to see the results page, as the search query will never reach Google.

And yeah, if you want to unblock facebook, check the rule number by issuing
iptables -L OUTPUT
And see the line number. If the rule you created is on 1st line then line number is 1. Now issue the following command:
iptables -D OUTPUT 1
Share
Banner

Newstechcafe

Post A Comment:

0 comments: