Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Jorge Davila <isaac@nicaraguarealestate.com>
To: netfilter <netfilter@lists.netfilter.org>
Cc: Patrick Leslie Polzer <leslie.polzer@gmx.net>
Subject: Re: Static/Dynamic NAT Combination
Date: Fri, 28 May 2004 15:52:48 -0600	[thread overview]
Message-ID: <40B7B4B0.2000608@nicaraguarealestate.com> (raw)
In-Reply-To: <20040528230807.21ed5eae.leslie.polzer@gmx.net>

Patrick Leslie Polzer wrote:

>On Fri, 28 May 2004 21:27:42 +0100
>Antony Stone <Antony@Soft-Solutions.co.uk> wrote:
>
>  
>
>>1. Give us a specific example of what you want to happen, showing us the 
>>source & destination addresses & port numbers for machines A & B, so we can 
>>see exactly what you want to do
>>    
>>
>Okay, maybe this time I'm better at it.
>
>There is a thing called 'binat' on OpenBSD.
>'binat' does NAT on _all_ incoming and outgoing connections on a specific
>interface, so I guess it is basically SNAT and DNAT combined in Netfilter
>jargon.
>So let's say there a router "R" with an interface called ppp0
>(1.1.1.1) and another one called eth0 (192.168.1.1/24), and a last
>one called eth1 (192.168.2.1/24).
>Moreover assume a box called 'A' on the eth0 network, and another one
>called 'B' on the eth1 network.
>So think of 'A' as my main working machine - it runs a webserver
>and maybe a lot more listening daemons. So I'd like to redirect
>any connections to R/ppp0:* to 'A' - with ports preserved of course.
>Also, any connection from eth0 which is routed via R/ppp0 must get
>translated - again, preferably (but this time not a must) without
>any port changing. That's the thing for box 'A' - not much of a problem
>for Netfilter, I suppose. Now 'B' comes into play. 'B' wants the standard
>NAT via R/ppp0 to the internet - no special stuff with ports here, just
>standard SNAT.
>Now, will there be any conflicts with this setup? Is it possible at all?
>To make things even more complicated, some ports should be excluded from
>the DNAT R/ppp0:* -> A, like 6667, because I want to run an IRC server
>on R (which is up 24/7).
>
>I hope this time my explanations are easier to understand as I don't
>like wasting other people's time for nothing.
>
>Thanks!
>
>Leslie
>  
>
pp0
+--------+
| router  |
+--------+
eth0 -> for net 192.168.1.0/24 -> here is the box A  [ in box A are many 
daemons runing ]
eth1 -> for net 192.168.2.0/24 -> here is the  box  B  [ nated ]

.- All packets *to* (pp0 and service port [in A]) must be *redirected* 
to box A. The packets wich destination port is a service port on A must 
go to A
.- If incoming packets in pp0 has a destination port over 1024 must pass 
the pp0 device with alteration....

I think thtat iptables can do the task.....



  reply	other threads:[~2004-05-28 21:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-28 15:58 Static/Dynamic NAT Combination Patrick Leslie Polzer
2004-05-28 20:16 ` Jorge Davila
     [not found] ` <40B79B3E.2050504@nicaraguarealestate.com>
2004-05-28 20:18   ` Patrick Leslie Polzer
2004-05-28 20:27     ` Antony Stone
2004-05-28 21:08       ` Patrick Leslie Polzer
2004-05-28 21:52         ` Jorge Davila [this message]
2004-05-28 20:37     ` Jorge Davila

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=40B7B4B0.2000608@nicaraguarealestate.com \
    --to=isaac@nicaraguarealestate.com \
    --cc=leslie.polzer@gmx.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