* Explicit source port mapping
@ 2006-11-01 15:24 Andreas Micklei
2006-11-01 15:48 ` Eric Leblond
2006-11-01 16:02 ` Frank Bulk
0 siblings, 2 replies; 5+ messages in thread
From: Andreas Micklei @ 2006-11-01 15:24 UTC (permalink / raw)
To: netfilter
Greetings,
I have an unusual (maybe?) request. I have several private IPs (192.168.x.x)
behind a Linux gateway. All are NATed to the Internet. Now I want to
explicitely map each private IP to a fixed source port range on the WAN
interface of the gateway.
Example:
Connections from 192.168.42.1 are mapped to source ports 1024 - 1279
Connections from 192.168.42.2 are mapped to source ports 1280 - 1343
Connections from 192.168.42.3 are mapped to source ports 1344 - 1408
...
Quetions 1: Can netfilter do this for me?
Question 2: If not, would it be easy to implement, and can someone give a
suggestion where I should start? - Or even better: Has someone already
implemented this?
Sorry if my question sounds stupid. In the HOWTOs I could only find implicit
source port mapping. Also I did not find a search interface for the
mailinglist. So if this question is already answered, pointers are
appreciated.
regards,
Andreas Micklei
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Explicit source port mapping
2006-11-01 15:24 Explicit source port mapping Andreas Micklei
@ 2006-11-01 15:48 ` Eric Leblond
2006-11-01 16:02 ` Andreas Micklei
2006-11-01 16:02 ` Frank Bulk
1 sibling, 1 reply; 5+ messages in thread
From: Eric Leblond @ 2006-11-01 15:48 UTC (permalink / raw)
To: Andreas Micklei; +Cc: netfilter
[-- Attachment #1: Type: text/plain, Size: 1254 bytes --]
Hi,
I've never heard about such a feature.
Just a simple question :
Why do you want to do this ?
BR,
Le mercredi 01 novembre 2006 à 16:24 +0100, Andreas Micklei a écrit :
> Greetings,
>
> I have an unusual (maybe?) request. I have several private IPs (192.168.x.x)
> behind a Linux gateway. All are NATed to the Internet. Now I want to
> explicitely map each private IP to a fixed source port range on the WAN
> interface of the gateway.
>
> Example:
>
> Connections from 192.168.42.1 are mapped to source ports 1024 - 1279
> Connections from 192.168.42.2 are mapped to source ports 1280 - 1343
> Connections from 192.168.42.3 are mapped to source ports 1344 - 1408
> ...
>
> Quetions 1: Can netfilter do this for me?
> Question 2: If not, would it be easy to implement, and can someone give a
> suggestion where I should start? - Or even better: Has someone already
> implemented this?
>
> Sorry if my question sounds stupid. In the HOWTOs I could only find implicit
> source port mapping. Also I did not find a search interface for the
> mailinglist. So if this question is already answered, pointers are
> appreciated.
>
> regards,
> Andreas Micklei
>
>
--
Eric Leblond <eric@inl.fr>
INL
[-- Attachment #2: Ceci est une partie de message numériquement signée --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Explicit source port mapping
2006-11-01 15:48 ` Eric Leblond
@ 2006-11-01 16:02 ` Andreas Micklei
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Micklei @ 2006-11-01 16:02 UTC (permalink / raw)
To: Eric Leblond; +Cc: netfilter
Am Mittwoch, 1. November 2006 16:48 schrieben Sie:
> I've never heard about such a feature.
>
> Just a simple question :
> Why do you want to do this ?
We are deploying netfilter in a research project for a customer. He wants to
be able to distinguish natted hosts on the WAN side for traceability.
Just don't ask further. ;-)
So if no one has ever implemented that: Where do I start? Where is the
implicit source port mapping done (the one to avoid clashes) and can I hook
into this mechnism with a kernel module, or should I modify the existing
kernel code (which I have not looked at - yet)?
> BR,
>
> Le mercredi 01 novembre 2006 à 16:24 +0100, Andreas Micklei a écrit :
> > Greetings,
> >
> > I have an unusual (maybe?) request. I have several private IPs
> > (192.168.x.x) behind a Linux gateway. All are NATed to the Internet. Now
> > I want to explicitely map each private IP to a fixed source port range on
> > the WAN interface of the gateway.
> >
> > Example:
> >
> > Connections from 192.168.42.1 are mapped to source ports 1024 - 1279
> > Connections from 192.168.42.2 are mapped to source ports 1280 - 1343
> > Connections from 192.168.42.3 are mapped to source ports 1344 - 1408
> > ...
> >
> > Quetions 1: Can netfilter do this for me?
> > Question 2: If not, would it be easy to implement, and can someone give a
> > suggestion where I should start? - Or even better: Has someone already
> > implemented this?
> >
> > Sorry if my question sounds stupid. In the HOWTOs I could only find
> > implicit source port mapping. Also I did not find a search interface for
> > the mailinglist. So if this question is already answered, pointers are
> > appreciated.
> >
> > regards,
> > Andreas Micklei
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Explicit source port mapping
2006-11-01 15:24 Explicit source port mapping Andreas Micklei
2006-11-01 15:48 ` Eric Leblond
@ 2006-11-01 16:02 ` Frank Bulk
2006-11-01 16:10 ` Andreas Micklei
1 sibling, 1 reply; 5+ messages in thread
From: Frank Bulk @ 2006-11-01 16:02 UTC (permalink / raw)
To: 'Andreas Micklei', netfilter
Sure, that can be done. Look at this:
http://www.netfilter.org/documentation/HOWTO/NAT-HOWTO-6.html#ss6.1
in detail. Specifically, the :1-1023 at the end of the POSTROUTING command.
Regards,
Frank
-----Original Message-----
From: netfilter-bounces@lists.netfilter.org
[mailto:netfilter-bounces@lists.netfilter.org] On Behalf Of Andreas Micklei
Sent: Wednesday, November 01, 2006 9:24 AM
To: netfilter@lists.netfilter.org
Subject: Explicit source port mapping
Greetings,
I have an unusual (maybe?) request. I have several private IPs (192.168.x.x)
behind a Linux gateway. All are NATed to the Internet. Now I want to
explicitely map each private IP to a fixed source port range on the WAN
interface of the gateway.
Example:
Connections from 192.168.42.1 are mapped to source ports 1024 - 1279
Connections from 192.168.42.2 are mapped to source ports 1280 - 1343
Connections from 192.168.42.3 are mapped to source ports 1344 - 1408
...
Quetions 1: Can netfilter do this for me?
Question 2: If not, would it be easy to implement, and can someone give a
suggestion where I should start? - Or even better: Has someone already
implemented this?
Sorry if my question sounds stupid. In the HOWTOs I could only find implicit
source port mapping. Also I did not find a search interface for the
mailinglist. So if this question is already answered, pointers are
appreciated.
regards,
Andreas Micklei
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Explicit source port mapping
2006-11-01 16:02 ` Frank Bulk
@ 2006-11-01 16:10 ` Andreas Micklei
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Micklei @ 2006-11-01 16:10 UTC (permalink / raw)
To: frnkblk; +Cc: netfilter
Am Mittwoch, 1. November 2006 17:02 schrieb Frank Bulk:
> Sure, that can be done. Look at this:
> http://www.netfilter.org/documentation/HOWTO/NAT-HOWTO-6.html#ss6.1
> in detail. Specifically, the :1-1023 at the end of the POSTROUTING
> command.
BINGO!
Thanks, I must have overlooked this. *slap on forehead*
regards,
Andreas Micklei
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-11-01 16:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-01 15:24 Explicit source port mapping Andreas Micklei
2006-11-01 15:48 ` Eric Leblond
2006-11-01 16:02 ` Andreas Micklei
2006-11-01 16:02 ` Frank Bulk
2006-11-01 16:10 ` Andreas Micklei
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.