Linux Netfilter discussions
 help / color / mirror / Atom feed
From: InfoMail <infomail@nobarrier.co.za>
To: "Leonardo Rodrigues Magalhães" <leolistas@solutti.com.br>
Cc: rockey dada <rockeydada@yahoo.com>, netfilter@lists.netfilter.org
Subject: Re: FQDN filtering
Date: Tue, 30 Aug 2005 17:22:17 +0200	[thread overview]
Message-ID: <431479A9.40105@nobarrier.co.za> (raw)
In-Reply-To: <43145D94.40707@solutti.com.br>


this is the rule and below is the error .. is this ment to work

$IPTAB -A OUTPUT -p tcp -o eth0 -s 0/0 -d www.microsoft.com -j DROP
##$IPTAB -A FORWARD -s 0/0 -d www.microsoft.com -m state --state NEW -j DROP


starting rules for NATing
iptables v1.2.11: host/network `www.microsoft.com' not found
Try `iptables -h' or 'iptables --help' for more information.


Leonardo Rodrigues Magalhães wrote:

>
>    Well .... yes it can and no it cannot.
>
>    All rules can have FQDN instead of IPs. But FQDNs will be solved to 
> IPs and rules will be created using IPs.
>
> Rule:
> iptables -A INPUT -s www.microsoft.com -j DROP
>
> is completly valid, but will be translated to:
>
> iptables -A INPUT -s 207.46.198.30 -j DROP
> iptables -A INPUT -s 207.46.198.60 -j DROP
> iptables -A INPUT -s 207.46.199.30 -j DROP
> iptables -A INPUT -s 207.46.225.60 -j DROP
> iptables -A INPUT -s 207.46.18.30 -j DROP
> iptables -A INPUT -s 207.46.19.30 -j DROP
> iptables -A INPUT -s 207.46.19.60 -j DROP
> iptables -A INPUT -s 207.46.20.60 -j DROP
>
>    when you hit the ENTER key or execute your firewall script. You 
> will not see 'www.microsoft.com' if you do 'iptables -nL -v', you will 
> only see the translated IP addresses. If FQDN changes IP addresses, 
> iptables will not see that change because DNS query for searching IPs 
> is done only when the rule is created.
>
>    I think there's a limit on how many IPs iptables can handle for a 
> single FQDN, but I dont know what this limit is.
>
>    iptables seems to CANNOT have rules with FQDN and keep the FQDN 
> instead of IPs.
>
>    Anyway, filtering FQDNs seems to be nice on application level and 
> not always on IP level. Are you thinking on web filtering ??? Why not 
> using a http proxy (squid) for doing that ?? Are you thinking on SPAM 
> fighting ?? Why not using your MTA capabilities for that ??
>
>    Sincerily,
>    Leonardo Rodrigues
>
>
> rockey dada escreveu:
>
>> Is there any way one can use IPTABLES to filter traffic based on "Fully
>> Qualified Domain Names".
>>
>> Rgds
>>
>>  
>>


______________________________________
XamimeLT - installed on mailserver for domain @nobarrier.co.za
Queries to: postmaster@nobarrier.co.za


  parent reply	other threads:[~2005-08-30 15:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-30 12:58 FQDN filtering rockey dada
2005-08-30 13:22 ` Leonardo Rodrigues Magalhães
2005-08-30 14:54   ` /dev/rob0
2005-08-30 15:22   ` InfoMail [this message]
2005-08-30 17:23     ` /dev/rob0
2005-08-30 17:41 ` rb
  -- strict thread matches above, loose matches on Subject: below --
2005-08-30 13:23 Baake, Matthias

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=431479A9.40105@nobarrier.co.za \
    --to=infomail@nobarrier.co.za \
    --cc=leolistas@solutti.com.br \
    --cc=netfilter@lists.netfilter.org \
    --cc=rockeydada@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox