Linux Netfilter discussions
 help / color / mirror / Atom feed
* How to nat a full subnet ?
@ 2003-05-11  8:44 Francois LE BOURDELLES
  2003-05-11 11:03 ` Laurent Luyckx
  0 siblings, 1 reply; 5+ messages in thread
From: Francois LE BOURDELLES @ 2003-05-11  8:44 UTC (permalink / raw)
  To: netfilter

Hello happy netfilter users,

First i use kernel 2.4.20 patch-o-matic'ed and iptables 2.4.8
I have to SNAT an DNAT a full subnet (199.1.4.0/0 (internal address
plan) to 1998.1.4.0/0 (external view))
so I tried to use the command :

iptables -t nat -A POSTROUTING -s 199.1.4.0/24 --to 199.1.4.0/24 -o
tunnel0 -j SNAT
(tunnel0 is a GRE typed tunnel)

as the NAT Howto page shows (NAT-HOWTO-6.html).

The aim is to have per exemple : 199.1.4.13 source changed to 198.1.4.13

but this command is rejected :

As I understand the sources (iptables and kernel) this is because the
--to only accept single IP address
or a range of IP-address, the last one for a pool automatic selection
[And I do not know for what this could be used !).

DO THE HOW-TO PAGES HAVE TO BE UPDATED (removing of the full subnet SNAT
and DNAT) ... or the iptables/ipfilter updated ?

Regards.
-- 
Francois LE BOURDELLES <flebourdelles@free.fr>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to nat a full subnet ?
  2003-05-11  8:44 How to nat a full subnet ? Francois LE BOURDELLES
@ 2003-05-11 11:03 ` Laurent Luyckx
  2003-05-11 15:57   ` Francois LE BOURDELLES
  2003-05-12 13:44   ` Jet
  0 siblings, 2 replies; 5+ messages in thread
From: Laurent Luyckx @ 2003-05-11 11:03 UTC (permalink / raw)
  To: Francois LE BOURDELLES; +Cc: netfilter

Have look a the NETMAP patch from p-o-m.
It creates a static 1:1 mapping of the network address.

(http://www.netfilter.org/documentation/pomlist/pom-combined.html#NETMAP)

Cheers.

On Sun, 2003-05-11 at 10:44, Francois LE BOURDELLES wrote:
> Hello happy netfilter users,
> 
> First i use kernel 2.4.20 patch-o-matic'ed and iptables 2.4.8
> I have to SNAT an DNAT a full subnet (199.1.4.0/0 (internal address
> plan) to 1998.1.4.0/0 (external view))
> so I tried to use the command :
> 
> iptables -t nat -A POSTROUTING -s 199.1.4.0/24 --to 199.1.4.0/24 -o
> tunnel0 -j SNAT
> (tunnel0 is a GRE typed tunnel)
> 
> as the NAT Howto page shows (NAT-HOWTO-6.html).
> 
> The aim is to have per exemple : 199.1.4.13 source changed to 198.1.4.13
> 
> but this command is rejected :
> 
> As I understand the sources (iptables and kernel) this is because the
> --to only accept single IP address
> or a range of IP-address, the last one for a pool automatic selection
> [And I do not know for what this could be used !).
> 
> DO THE HOW-TO PAGES HAVE TO BE UPDATED (removing of the full subnet SNAT
> and DNAT) ... or the iptables/ipfilter updated ?
> 
> Regards.
-- 
Laurent Luyckx <lololuy@tiscali.be>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to nat a full subnet ?
  2003-05-11 11:03 ` Laurent Luyckx
@ 2003-05-11 15:57   ` Francois LE BOURDELLES
  2003-05-12 13:44   ` Jet
  1 sibling, 0 replies; 5+ messages in thread
From: Francois LE BOURDELLES @ 2003-05-11 15:57 UTC (permalink / raw)
  To: Laurent Luyckx; +Cc: netfilter

Hello,

I will try it as soon as possible !

many thanks

Best regards.

Le dim 11/05/2003 à 13:03, Laurent Luyckx a écrit :
> Have look a the NETMAP patch from p-o-m.
> It creates a static 1:1 mapping of the network address.
> 
> (http://www.netfilter.org/documentation/pomlist/pom-combined.html#NETMAP)
> 
> Cheers.
> 
> On Sun, 2003-05-11 at 10:44, Francois LE BOURDELLES wrote:
> > Hello happy netfilter users,
> > 
> > First i use kernel 2.4.20 patch-o-matic'ed and iptables 2.4.8
> > I have to SNAT an DNAT a full subnet (199.1.4.0/0 (internal address
> > plan) to 1998.1.4.0/0 (external view))
> > so I tried to use the command :
> > 
> > iptables -t nat -A POSTROUTING -s 199.1.4.0/24 --to 199.1.4.0/24 -o
> > tunnel0 -j SNAT
> > (tunnel0 is a GRE typed tunnel)
> > 
> > as the NAT Howto page shows (NAT-HOWTO-6.html).
> > 
> > The aim is to have per exemple : 199.1.4.13 source changed to 198.1.4.13
> > 
> > but this command is rejected :
> > 
> > As I understand the sources (iptables and kernel) this is because the
> > --to only accept single IP address
> > or a range of IP-address, the last one for a pool automatic selection
> > [And I do not know for what this could be used !).
> > 
> > DO THE HOW-TO PAGES HAVE TO BE UPDATED (removing of the full subnet SNAT
> > and DNAT) ... or the iptables/ipfilter updated ?
> > 
> > Regards.
-- 
Francois LE BOURDELLES <flebourdelles@free.fr>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to nat a full subnet ?
  2003-05-11 11:03 ` Laurent Luyckx
  2003-05-11 15:57   ` Francois LE BOURDELLES
@ 2003-05-12 13:44   ` Jet
  2003-05-12 21:33     ` Francois LE BOURDELLES
  1 sibling, 1 reply; 5+ messages in thread
From: Jet @ 2003-05-12 13:44 UTC (permalink / raw)
  To: Laurent Luyckx, Francois LE BOURDELLES; +Cc: netfilter

Do I've to create any ARP entry for the external IP address range for this
to work?

- Jet

Laurent Luyckx <lololuy@tiscali.be> wrote:
> Have look a the NETMAP patch from p-o-m.
> It creates a static 1:1 mapping of the network address.
>
> (http://www.netfilter.org/documentation/pomlist/pom-combined.html#NETMAP)
>
> Cheers.
>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to nat a full subnet ?
  2003-05-12 13:44   ` Jet
@ 2003-05-12 21:33     ` Francois LE BOURDELLES
  0 siblings, 0 replies; 5+ messages in thread
From: Francois LE BOURDELLES @ 2003-05-12 21:33 UTC (permalink / raw)
  To: Jet; +Cc: Laurent Luyckx (netfilter.org), netfilter

[-- Attachment #1: Type: text/plain, Size: 764 bytes --]

No, I've tested it today with success (even if I had to patchomaticto
add this NETMAP from the base proposal to my 2.4.20 source tree and
rebuild the iptable accordingly.

(see the README and INSTALL files from the patch-o-matic and iptable
from the netfilter.org last release)

regards.

Le lun 12/05/2003 à 15:44, Jet a écrit :

> Do I've to create any ARP entry for the external IP address range for this
> to work?
> 
> - Jet
> 
> Laurent Luyckx <lololuy@tiscali.be> wrote:
> > Have look a the NETMAP patch from p-o-m.
> > It creates a static 1:1 mapping of the network address.
> >
> > (http://www.netfilter.org/documentation/pomlist/pom-combined.html#NETMAP)
> >
> > Cheers.
> >

-- 
Francois LE BOURDELLES <flebourdelles@free.fr>

[-- Attachment #2: Type: text/html, Size: 1386 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-05-12 21:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-11  8:44 How to nat a full subnet ? Francois LE BOURDELLES
2003-05-11 11:03 ` Laurent Luyckx
2003-05-11 15:57   ` Francois LE BOURDELLES
2003-05-12 13:44   ` Jet
2003-05-12 21:33     ` Francois LE BOURDELLES

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox