From: Abdul-Wahid Paterson <abdulwahid@gmail.com>
To: Netfilter List <netfilter@lists.netfilter.org>
Subject: Re: Multiple iptables exceptions?
Date: Thu, 23 Sep 2004 16:59:52 +0100 [thread overview]
Message-ID: <995fcdb0040923085916643d3a@mail.gmail.com> (raw)
In-Reply-To: <4152EA7B.3010802@pbl.ca>
I think it is better to do it this way incase there are other rules
that need to be traversed in the PREROUTING chain.
iptables -t nat -N MS
iptables -t nat -A MS -d 207.46.0.0/16 -j RETURN
iptables -t nat -A MS -d 64,4,0,0/16 -j RETURN
iptables -t nat -A MS -j DNAT --to-destination 10.1.1.3:80
iptables -t nat -A PREROUTING -j MS
Regards,
Abdul-Wahid
On Thu, 23 Sep 2004 10:23:39 -0500, Aleksandar Milivojevic
<amilivojevic@pbl.ca> wrote:
> 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
>
>
next prev parent reply other threads:[~2004-09-23 15:59 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
2004-09-23 15:59 ` Abdul-Wahid Paterson [this message]
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=995fcdb0040923085916643d3a@mail.gmail.com \
--to=abdulwahid@gmail.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