Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Gáspár Lajos" <swifty@freemail.hu>
To: nunezj@ucbcba.edu.bo
Cc: netfilter@lists.netfilter.org
Subject: Re: Filter ips
Date: Fri, 01 Sep 2006 09:46:35 +0200	[thread overview]
Message-ID: <44F7E55B.5000406@freemail.hu> (raw)
In-Reply-To: <4298.200.87.170.170.1157063657.squirrel@admin.ucbcba.edu.bo>

nunezj@ucbcba.edu.bo írta:
> Hi everyone
>
>        I have some problems when I want to filter some ips in  my network
>
>  I put this rules in the my script:
>
>  iptables -A INPUT -s 192.168.0.5/32 -d 0/0 -p tcp --dport 20,21 -j DROP
>
>  but it doesn't work. The same I put in the Output rules but it doen't
> work....
>
>   How can I make this filter?
>
> regards,
>
>              Jorge Enrique
>   
Maybe this line will help you:

iptables -A INPUT -s 192.168.0.5 -p tcp -m multiports --dports 20,21 -j DROP

This only filters the incoming traffic
To filter the forward traffic use this:

iptables -A FORWARD -s 192.168.0.5 -p tcp -m multiports --dports 20,21 
-j DROP


iptables -vnL              is you friend !!! :)
iptables -t nat -vnL       also !!! :)

Swifty


  parent reply	other threads:[~2006-09-01  7:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-31 22:34 Filter ips nunezj
2006-09-01  7:35 ` Jan Engelhardt
2006-09-01  7:46 ` Gáspár Lajos [this message]
2006-09-01  7:56   ` Jan Engelhardt
2006-09-01  8:05     ` Gáspár Lajos
2006-09-01 10:14 ` Pascal Hambourg

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=44F7E55B.5000406@freemail.hu \
    --to=swifty@freemail.hu \
    --cc=netfilter@lists.netfilter.org \
    --cc=nunezj@ucbcba.edu.bo \
    /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