LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 10-03-2005, 01:55 AM   #1
nkutty
Member
 
Registered: Aug 2005
Posts: 34

Rep: Reputation: 15
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
 
Old 10-03-2005, 04:15 AM   #2
nixcraft
Member
 
Registered: Nov 2004
Location: BIOS
Distribution: RHEL3.0, FreeBSD 5.x, Debian 3.x, Soaris x86 v10
Posts: 379

Rep: Reputation: 30
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to BLOCK SLEEZE SITES? saugato Linux - Security 3 02-11-2005 08:39 PM
Looking to block out certain webb sites HenchmenResourc SUSE / openSUSE 1 12-02-2004 08:13 AM
allow certain sites and block rest all of them mcgrath Programming 1 11-24-2004 10:53 AM
Make MozillaFirebird block sites *not popup/ads* GT_Onizuka Linux - Software 4 11-02-2003 03:52 PM
how to block sites with squid.conf boakiba Linux - Networking 1 08-11-2003 05:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration