Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

iptables block host name instead of ip address

Reply
 
Thread Tools Display Modes
  #1  
Old 02-04-2005, 09:43 AM
Default iptables block host name instead of ip address



How do i block traffic to a specifick hostname.
For example www.hotmail.com

host www.hotmail.com
www.hotmail.com is an alias for www.hotmail.com.nsatc.net.
www.hotmail.com.nsatc.net has address 166.63.208.155
www.hotmail.com.nsatc.net has address 207.68.172.241
www.hotmail.com.nsatc.net has address 208.173.208.152

Now i insert all the seperate ip addresses so trafic to
www.hotmail.com is blocked.

However, when the ip address change, people can go to www.hotmail.com
again, without notice.

Can this be done with iptables or perhaps some other way?

Kind Regards


-
Reply With Quote
  #2  
Old 02-04-2005, 09:53 AM
David Schwartz
Guest
 
Posts: n/a
Default Re: iptables block host name instead of ip address


"-" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> How do i block traffic to a specifick hostname.
> For example www.hotmail.com
>
> host www.hotmail.com
> www.hotmail.com is an alias for www.hotmail.com.nsatc.net.
> www.hotmail.com.nsatc.net has address 166.63.208.155
> www.hotmail.com.nsatc.net has address 207.68.172.241
> www.hotmail.com.nsatc.net has address 208.173.208.152
>
> Now i insert all the seperate ip addresses so trafic to
> www.hotmail.com is blocked.
>
> However, when the ip address change, people can go to www.hotmail.com
> again, without notice.
>
> Can this be done with iptables or perhaps some other way?


Fundamentally this cannot be done. In principle, an IP filter has no way
of knowing what host name another computer used to establish what IP address
it's connecting to.

It's like trying to program a telephone system to prevent calls to
George Jones, even if his phone number changes or he is at a friend's house.
The phone system has no idea who you are calling, just what number you
dialed.

DS


Reply With Quote
  #3  
Old 02-04-2005, 09:56 AM
Davide Bianchi
Guest
 
Posts: n/a
Default Re: iptables block host name instead of ip address

On 2005-02-04, - <(E-Mail Removed)> wrote:
> How do i block traffic to a specifick hostname.
> For example www.hotmail.com


In your DNS define www.hotmail.com to point to 127.0.0.1 or just program
your proxy to forbid that domain.
This will not block the connections but make them to fail.

Davide

--
The hardware is the part of the computer that you an kick.
Reply With Quote
Reply

Tags
address, block, host, iptables

Thread Tools
Display Modes

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 On
HTML code is Off
Forum Jump


All times are GMT. The time now is 07:18 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.