LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (http://www.linuxquestions.org/questions/linux-security-4/)
-   -   block some sites (http://www.linuxquestions.org/questions/linux-security-4/block-some-sites-369254/)

nkutty 10-03-2005 01:55 AM

block some sites
 
Dear all

i wnat to block some websites like msn.com, microsoft.com hotmail.com.. like that

i want to stop or block using iptables can u give some sample example entry


thanks

nkutty

nixcraft 10-03-2005 04:15 AM

If you are using squid then it is quit easy to setup deny filter. Or you can use iptables.

First find out ip address of site such as hotmail.com
Code:

nslookup hotmail.com
Server:        203.145.xxx.xx
Address:        203.145.xxx.xx#53

Non-authoritative answer:
Name:  hotmail.com
Address: 64.4.33.7
Name:  hotmail.com
Address: 64.4.32.7

and use iptables to append rule to exisitng tables (better in script)
Code:

iptables -A OUTPUT -d 64.4.32.7 -j DROP
See for more example http://www.cyberciti.biz/nixcraft/vi...-outgoing.html


All times are GMT -5. The time now is 04:52 PM.