All of lore.kernel.org
 help / color / mirror / Atom feed
* FW: Filtering multiple networks
@ 2004-05-31 10:32 Markus Zeilinger
  2004-05-31 10:44 ` David Cannings
  2004-05-31 10:45 ` Frank Gruellich
  0 siblings, 2 replies; 6+ messages in thread
From: Markus Zeilinger @ 2004-05-31 10:32 UTC (permalink / raw)
  To: netfilter

Hi Frank,

thx for you prompt answer! Two questions on your comments:

- Thy is DROP bad here? As I see REJECT would send an error message back to
the source, but this would not make any sense on packets coming on the WAN
interface with private IP addresses, or am I wrong?

- Why is INPUT not appropriated here? Should I do the dropping earlier
perhaps in the mangle table?

And yes I will do something similiar in the FORWARD chain :-)

Thx again!

Cheers,
Markus

-----Original Message-----
From: netfilter-admin@lists.netfilter.org
[mailto:netfilter-admin@lists.netfilter.org] On Behalf Of Frank Gruellich
Sent: Monday, May 31, 2004 12:08 PM
To: netfilter
Subject: Re: Filtering multiple networks

* Markus Zeilinger <mz@sea.uni-linz.ac.at> 31. May 04:
> Hi all,

Hello,

> sorry if this is a stupid question, I am just a newbie with iptables.

Okay.

> Now I would like to drop

Drop is considered to be bad.  Maybe you should prefer REJECT.

> all packets coming on the Internet interface on the firewall with
> source address out of the private IP address ranges (10.0.0.0/8,
> 192.168.0.0/16, 172.16.0.0/12 and 169.254.0.0/16).

You have to split it.

> I use the following syntax in my script:
> 
> ...
> WAN_IFACE="eth0"
> PRIV_IP="10.0.0.0/8,192.168.0.0/16,172.16.0.0/12,169.254.0.0/16"

PRIV_IP="10.0.0.0/8 192.168.0.0/16 172.16.0.0/12 169.254.0.0/16"

> iptables -A INPUT -i $WAN_IFACE -s $PRIV_IP -j DROP

Well, INPUT isn't very appropriated, but:

for ip in $PRIV_IP; do iptables -A INPUT -i $WAN_IFACE -s $ip -j DROP; done

Maybe you should have something like this in your FORWARD, too.

HTH,
 regards, Frank.
-- 
Sigmentation fault



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-05-31 20:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-31 10:32 FW: Filtering multiple networks Markus Zeilinger
2004-05-31 10:44 ` David Cannings
2004-05-31 10:45 ` Frank Gruellich
2004-05-31 13:19   ` David Cannings
2004-05-31 19:23     ` Frank Gruellich
2004-05-31 20:59       ` David Cannings

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.