From: Fred Richards <Toril@twcny.rr.com>
To: netfilter@lists.samba.org
Subject: Re: How do you specify an odd group of hosts?
Date: Thu, 13 Jun 2002 16:31:34 -0400 [thread overview]
Message-ID: <3D090126.1050509@twcny.rr.com> (raw)
In-Reply-To: 200206131638.RAA08412@slate.rockstone.co.uk
This is what I did ... write a script! You could have several parts,
one for accepted hosts, etc... I actually had certain ports that I had a
bunch of eggdrops allowed access on... listed the rules for the ports
and added the IPs to the first line ...
for i in a.b.c.d e.f.g.h i.j.k.l
do
iptables -A inet-in -s $i -j ACCEPT
done
Antony Stone wrote:
>On Thursday 16 May 2002 12:12 am, Adrian Hobbs wrote:
>
>
>
>>I am wondering what is the best way to specify an odd group of hosts. For
>>example, I want to allow managment hosts access to 192.168.0.5. The
>>managment hosts are 192.168.1.4, 192.168.1.12, 192.168.1.96.
>>
>>eg:
>>iptables -A FORWARD -p tcp -d 192.168.0.5 --dport 22 -j MNG_HOST
>>
>>iptables -A MNG_HOST -s 192.168.1.4 -j ACCEPT
>>iptables -A MNG_HOST -s 192.168.1.12 -j ACCEPT
>>iptables -A MNG_HOST -s 192.168.1.96 -j ACCEPT
>>iptables -A MNG_HOST -j DENY
>>
>>
>
>Looks like the best way of doing it to me. There's no way to specify
>multiple source or destination addresses in a single iptables rule except for
>the contiguous network ranges you've already found in the docs.
>
>
>
>Antony.
>
>
>
>
prev parent reply other threads:[~2002-06-13 20:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-15 23:12 How do you specify an odd group of hosts? Adrian Hobbs
2002-06-13 16:37 ` Antony Stone
2002-06-13 20:31 ` Fred Richards [this message]
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=3D090126.1050509@twcny.rr.com \
--to=toril@twcny.rr.com \
--cc=netfilter@lists.samba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox