All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aleksandar Milivojevic <amilivojevic@pbl.ca>
To: netfilter@lists.netfilter.org
Subject: Re: Multiple iptables exceptions?
Date: Thu, 23 Sep 2004 10:23:39 -0500	[thread overview]
Message-ID: <4152EA7B.3010802@pbl.ca> (raw)
In-Reply-To: <bc9fb38004092308087dc97b87@mail.gmail.com>

Jaret wrote:
> conceptually what im looking for is something like this...
> 
> IPTABLES -t nat -A PREROUTING -s 10.1.1.2 -d ! 207.46.0.0/16,
> 64.4.0.0/16 --proto tcp --dport 80 -j DNAT --to-destination
> 10.1.1.3:80

You can try using user defined chain.  Add source, protocol and port 
options back into three PREROUTING rules, I left them out for clarity:

iptables -t nat -N MS
iptables -t nat -A MS -j ACCEPT
iptables -t nat -A PREROUTING -d 207.46.0.0/16 -j MS
iptables -t nat -A PREROUTING -d 64.4.0.0/16 -j MS
iptables -t nat -A PREROUTING -j DNAT --to-destination 10.1.1.3:80

-- 
Aleksandar Milivojevic <amilivojevic@pbl.ca>    Pollard Banknote Limited
Systems Administrator                           1499 Buffalo Place
Tel: (204) 474-2323 ext 276                     Winnipeg, MB  R3T 1L7


  reply	other threads:[~2004-09-23 15:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-23 15:08 Multiple iptables exceptions? Jaret
2004-09-23 15:23 ` Aleksandar Milivojevic [this message]
2004-09-23 15:59   ` Abdul-Wahid Paterson
2004-09-23 18:27     ` Jaret

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=4152EA7B.3010802@pbl.ca \
    --to=amilivojevic@pbl.ca \
    --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.