LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 06-20-2005, 05:55 PM   #16
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380

Quote:
Originally posted by jonlake
Why don't you just block the IP address of www.hotmail.com
because they probably have a million different IP addresses...
 
Old 06-21-2005, 08:40 AM   #17
jonlake
Member
 
Registered: Apr 2004
Distribution: Slackware 11.0, Gentoo
Posts: 252

Rep: Reputation: 31
They have 3 that resolve www.hotmail.com and 2 that resolve hotmail.com. 5 entries wouldn't be too bad.
 
Old 06-23-2005, 01:34 AM   #18
primo
Member
 
Registered: Jun 2005
Posts: 542

Rep: Reputation: 34
Such a "feature" is sexy only on M$ Windows "firewalls".

Blocking "hotmail" would block this page too.
Such a module will have to check almost all packets for "hotmail" or "hoTMail" or "HOTmail", etc... So, be sure to set the ignore-case option, if any.

Also, packets get split on the internet.
It must be a nightmare to just imagine the potential security risks of many buffers that get later discarded, and holding it all together.
 
Old 06-23-2005, 01:39 AM   #19
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
i use dansguardian, so if i wanted to block hotmail.com all i'd have to do would be add "hotmail.com" to my bannedsitelist file - simple and effective...

 
Old 06-23-2005, 01:45 PM   #20
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
If you do decide to block hotmail.com using text string matching, try just blocking it on tcp and udp ports 53 (DNS ports). Otherwise, any webpage containing the word "hotmail" will be lost. Any email containing the word "hotmail" will go down as well. In fact, if you are using POP3/IMAP and have iptables block the word "hotmail", then you will be disconnected from the mail server at that point. This would render it IMPOSSIBLE to get your email.
 
Old 06-28-2005, 07:14 PM   #21
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
The proper way would be to setup a squid proxy server and put hotmail in a blacklist of sites. In your squid.conf:

Code:
acl blacklist   url_regex "/etc/squid/blacklist"
http_access deny  blacklist
/etc/squid/blacklist:
Code:
.hotmail.com
Then you need to set your firewall to block outgoing port 80 from machines in your LAN and then set the web browsers on those machines to point to your proxy server.You could also look at SquidGuard which I think is specially designed for just this type of thing.

Keep in mind the difference between this type of thing (URL filtering) and content filtering (which looks at the actual content of the page, not just the URL) using things like dansguardian.
 
Old 06-29-2005, 11:24 AM   #22
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
does squid do reverse dns when one blocks a url with an acl??
 
Old 06-29-2005, 11:31 AM   #23
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Quote:
Originally posted by win32sux
does squid do reverse dns when one blocks a url with an acl??
Why do you need reverse dns?
 
Old 06-29-2005, 11:47 AM   #24
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally posted by Matir
Why do you need reverse dns?
so that when you block a domain by using it's dns name the person will also be blocked from accessing that server by using it's IP address... dansguardian does this, but i want to know if squid can do this on it's own when you acl a dns url...
 
Old 06-29-2005, 01:17 PM   #25
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
That would be normal dns, not reverse, and I don't believe that would work. You'd need to block the IP as well.
 
Old 06-29-2005, 01:27 PM   #26
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally posted by Matir
That would be normal dns, not reverse, and I don't believe that would work. You'd need to block the IP as well.
no, it's reverse dns... you tell the software to block "domain.com"... the software would perform a reverse dns query for any IP-based URL it receives... so if a user would input an IP address in the browser the software would do a reverse lookup on the IP and if it matches the domain that was specificied it would block it...

you can't specify the IPs in all situations because you don't know what the IP is gonna be tomorrow (for example), or if the user will be routed to another IP, or if the domain has a million different IPs (like google) or whatever... it's much simpler and effective to simply block the domain and have the software take care of reverse dns checks...

dansguardian does this, i just want to know if squid can do this on it's own... anybody??


Last edited by win32sux; 06-29-2005 at 01:33 PM.
 
Old 06-29-2005, 01:58 PM   #27
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Even reverse dns is not 100% reliable, as one IP can have a dozen hostnames, which can have CNAMES, etc.
 
Old 06-29-2005, 05:36 PM   #28
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally posted by Matir
Even reverse dns is not 100% reliable, as one IP can have a dozen hostnames, which can have CNAMES, etc.
that's beside the point... i just wanted to know if squid could do it... i took a look at the squid.conf.default file and it looks like it can:
Code:
#       acl aclname srcdomain   .foo.com ...    # reverse lookup, client IP
#       acl aclname dstdomain   .foo.com ...    # Destination server from URL
#       acl aclname srcdom_regex [-i] xxx ...   # regex matching client name
#       acl aclname dstdom_regex [-i] xxx ...   # regex matching server
#         # For dstdomain and dstdom_regex  a reverse lookup is tried if a IP
#         # based URL is used and no match is found. The name "none" is used
#         # if the reverse lookup fails.

Last edited by win32sux; 06-29-2005 at 08:49 PM.
 
  


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 find duplicate strings in vertical column of strings markhod Programming 7 11-02-2005 04:04 AM
IPTables and PPTPD :S (to block or not to block) thewonka Linux - Networking 0 03-24-2005 06:58 PM
Using c++ to write to a text file. Im having problem with strings swatward Programming 4 02-03-2005 09:17 PM
Setting ip tables to block all traffic LinuxBAH Linux - Security 1 02-07-2004 06:15 AM
Wrapping text in tables Graanco Programming 1 09-27-2001 04:04 PM

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

All times are GMT -5. The time now is 11:48 PM.

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