Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "John A. Sullivan III" <john.sullivan@nexusmgmt.com>
To: ads nat <adsnat@yahoo.com>
Cc: netfilter@lists.netfilter.org
Subject: Re: Iptables rule for multiple Ip addresses.
Date: Tue, 15 Jun 2004 07:00:10 -0400	[thread overview]
Message-ID: <1087297209.3491.4.camel@localhost> (raw)
In-Reply-To: <20040615053549.29391.qmail@web60408.mail.yahoo.com>

On Tue, 2004-06-15 at 01:35, ads nat wrote:
> Hi,
> I am using Redhat Linux 9.0 with Iptables iptables
> v1.2.7a.
> I am trying to apply this rule for diverting trafic. 
> "eth1" is LAN interface for subnet 192.168.0.0/24
> ##########
> [root@xxx root]# iptables -t nat -A PREROUTING -s
> 192.168.0.2-192.168.0.10 -i eth0 -p tcp -j DNAT --to
> 10.0.0.2:80
> iptables v1.2.7a: host/network
> `192.168.0.2-192.168.0.10' not found
> Try `iptables -h' or 'iptables --help' for more
> information.
> ##########
> 
> It seems it does not accept multipal source addresses.
> I sther any other wat do achieve this.
> Thanks for support.
<snip>
You can either apply the iprange patch from patch-o-matic or, if you do
not want to or cannot patch, break it into several rules using subnets. 
I've used SubnetCreator (http://subnetcreator.sourceforge.net) to help
calculate subnets from ranges, e.g., 
192.168.0.2/31
192.168.0.4/30
192.168.0.8/31
192.168.0.10/32
-- 
John A. Sullivan III
Chief Technology Officer
Nexus Management
+1 207-985-7880
john.sullivan@nexusmgmt.com
---
If you are interested in helping to develop a GPL enterprise class
VPN/Firewall/Security device management console, please visit
http://iscs.sourceforge.net 



      parent reply	other threads:[~2004-06-15 11:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-15  5:35 Iptables rule for multiple Ip addresses ads nat
2004-06-15  6:13 ` Cedric Blancher
2004-06-15  7:35 ` Patrick Leslie Polzer
2004-06-15 11:00 ` John A. Sullivan III [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=1087297209.3491.4.camel@localhost \
    --to=john.sullivan@nexusmgmt.com \
    --cc=adsnat@yahoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox