All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Jellinghaus <aj@dungeon.inka.de>
To: Drew Weaver <drew.weaver@thenap.com>
Cc: netfilter@lists.netfilter.org
Subject: Re: allowing certain IP addresses.
Date: 17 May 2003 09:17:09 +0200	[thread overview]
Message-ID: <1053155828.627.22.camel@simulacron> (raw)
In-Reply-To: <75634F04BFCFD511BF69009027DC8649484265@mailman.thenap.com>

On Sat, 2003-05-17 at 08:26, Drew Weaver wrote:
> I would like to disclude a /25 from accessing a server except for 1 ip
> address on that /25 this is what I have in my rules.
> 
> /sbin/iptables -A INPUT -i eth0 -s 10.1.0.0/25 -j DUMP
> /sbin/iptables -A INPUT -i eth0 -s 10.1.0.52/32 -j ACCEPT
> 
> the blocking works, the 10.1.0.0/25 network cannot reach this server,
> however the 10.1.0.52/32 cant either.

use
/sbin/iptables -A INPUT -i eth0 -s 10.1.0.52/32 -j ACCEPT
/sbin/iptables -A INPUT -i eth0 -s 10.1.0.0/25 -j DUMP

instead.

filter lists:

private ip addresses: rfc 1918
> /sbin/iptables -A INPUT -i eth0 -s 10.0.0.0/8 -j DUMP   
> /sbin/iptables -A INPUT -i eth0 -s 172.16.0.0/12 -j DUMP
> /sbin/iptables -A INPUT -i eth0 -s 192.168.0.0/16 -j DUMP

loopback
> /sbin/iptables -A INPUT -i eth0 -s 127.0.0.0/8 -j DUMP

multicast, reserved
> /sbin/iptables -A INPUT -i eth0 -s 224.0.0.0/3 -j DUMP 

Andreas



  reply	other threads:[~2003-05-17  7:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-17  6:26 allowing certain IP addresses Drew Weaver
2003-05-17  7:17 ` Andreas Jellinghaus [this message]
2003-05-17  7:27 ` Cedric Blancher

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=1053155828.627.22.camel@simulacron \
    --to=aj@dungeon.inka.de \
    --cc=drew.weaver@thenap.com \
    --cc=netfilter@lists.netfilter.org \
    /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 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.