Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Glen Becker <solar04@comcast.net>
To: netfilter@lists.netfilter.org
Subject: Re: Dynamic redirection?
Date: 26 Feb 2004 10:24:43 -0500	[thread overview]
Message-ID: <1077809082.2771.5.camel@merlin> (raw)
In-Reply-To: <403DAF2C.1090303@snapgear.com>

Craig, thanks!  That works great for now; "simple is good".  If time
permits later I would like to experiment with your and Jeroen's
suggestion of marking.

-Glen

On Thu, 2004-02-26 at 03:32, Philip Craig wrote:
> Use these rules:
> 
> -t nat -A PREROUTING -s 192.168.2.128 -j ACCEPT
> -t nat -A PREROUTING -d 192.168.2.128 -j ACCEPT
> -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j DNAT --to 192.168.2.1
> -P FORWARD DROP
> -A FORWARD -p udp --dport 53 -j ACCEPT
> -A FORWARD -p udp --sport 53 -j ACCEPT
> -A FORWARD -s 192.168.2.128 -p ALL -j ACCEPT
> -A FORWARD -d 192.168.2.128 -p ALL -j ACCEPT
> 
> If you don't like duplicating the rules like that, then you could
> set marks in mangle PREROUTING and base both the nat and filter rules
> off the mark.  Or you could patch your kernel to use ippool or ipset,
> then you wouldn't need to dynamically add rules at all, you just
> have one rule each in nat and filter referring to the pool/set.



  reply	other threads:[~2004-02-26 15:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-26  5:42 Dynamic redirection? Glen Becker
2004-02-26  8:32 ` Philip Craig
2004-02-26 15:24   ` Glen Becker [this message]
2004-02-26  9:25 ` Jeroen Vriesman
  -- strict thread matches above, loose matches on Subject: below --
2004-02-26  8:00 Daniel Chemko

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=1077809082.2771.5.camel@merlin \
    --to=solar04@comcast.net \
    --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