* Connecting an host with a subnet to a LAN with different subnet
@ 2008-08-27 18:27 DI BACCO ANTONIO - technolabs
2008-08-27 19:04 ` bsilva
2008-08-27 19:36 ` Grant Taylor
0 siblings, 2 replies; 5+ messages in thread
From: DI BACCO ANTONIO - technolabs @ 2008-08-27 18:27 UTC (permalink / raw)
To: netfilter
I have a LAN with a given subnet, let us say: 192.168.0.0/24 with a lot
of hosts. Now I want to connect another host (PLUTO) with an interface
that has address 10.10.10.1 and netmask 255.255.255.0. I can't change
this ip address but I want to insert some iptables rules on PLUTO to
translate both source and dest ip address of the packets it receives to
subnet 10.10.10.0/24 and viceversa. I think that target NETMAP can help
me, but I'm getting confused.
Bye,
Antonio.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Connecting an host with a subnet to a LAN with different subnet
2008-08-27 18:27 Connecting an host with a subnet to a LAN with different subnet DI BACCO ANTONIO - technolabs
@ 2008-08-27 19:04 ` bsilva
2008-08-28 7:10 ` DI BACCO ANTONIO - technolabs
2008-08-27 19:36 ` Grant Taylor
1 sibling, 1 reply; 5+ messages in thread
From: bsilva @ 2008-08-27 19:04 UTC (permalink / raw)
To: DI BACCO ANTONIO - technolabs; +Cc: netfilter
There may be subtlties to your problem that this solution cannot address,
but a simpler solution and one that I've used many times is to give the
machine a secondary IP address on the same interface.
i.e. "ifconfig eth0:1 192.168.0.x"
Then both addresses are present on the system.
Regards,
Brad
On Wed, 27 Aug 2008, DI BACCO ANTONIO - technolabs wrote:
>
>
> I have a LAN with a given subnet, let us say: 192.168.0.0/24 with a lot
> of hosts. Now I want to connect another host (PLUTO) with an interface
> that has address 10.10.10.1 and netmask 255.255.255.0. I can't change
> this ip address but I want to insert some iptables rules on PLUTO to
> translate both source and dest ip address of the packets it receives to
> subnet 10.10.10.0/24 and viceversa. I think that target NETMAP can help
> me, but I'm getting confused.
>
> Bye,
> Antonio.
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Connecting an host with a subnet to a LAN with different subnet
2008-08-27 18:27 Connecting an host with a subnet to a LAN with different subnet DI BACCO ANTONIO - technolabs
2008-08-27 19:04 ` bsilva
@ 2008-08-27 19:36 ` Grant Taylor
1 sibling, 0 replies; 5+ messages in thread
From: Grant Taylor @ 2008-08-27 19:36 UTC (permalink / raw)
To: Mail List - Netfilter
On 08/27/08 13:27, DI BACCO ANTONIO - technolabs wrote:
> I have a LAN with a given subnet, let us say: 192.168.0.0/24 with a
> lot of hosts. Now I want to connect another host (PLUTO) with an
> interface that has address 10.10.10.1 and netmask 255.255.255.0. I
> can't change this ip address but I want to insert some iptables rules
> on PLUTO to translate both source and dest ip address of the packets
> it receives to subnet 10.10.10.0/24 and viceversa. I think that
> target NETMAP can help me, but I'm getting confused.
Silly question, why not add the 192.168.0.0/24 network to PLUTO? I.e.
make PLUTO be multihomed in both the 10.10.10.1 network and the
192.168.0.0/24 network?
Also, unless you need to map multiple IPs across from one network to the
other I think I'd recommend that you only NAT the one IP that PLUTO is
using to avoid potential conflicts.
Even with NETMAP and / or NATing I think you are going to have PLUTO (or
what ever system does the NETMAP / NATing) have an interface in both
networks.
Grant. . . .
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Connecting an host with a subnet to a LAN with different subnet
2008-08-27 19:04 ` bsilva
@ 2008-08-28 7:10 ` DI BACCO ANTONIO - technolabs
2008-08-28 21:04 ` James King
0 siblings, 1 reply; 5+ messages in thread
From: DI BACCO ANTONIO - technolabs @ 2008-08-28 7:10 UTC (permalink / raw)
To: bsilva; +Cc: netfilter
This can be a good solution but my problem is that PLUTO cannot have the 192.168.0.x address at all.
Thank you,
Antonio.
-----Original Message-----
From: bsilva [mailto:bsilva@sonic.net]
Sent: mercoledì 27 agosto 2008 21.04
To: DI BACCO ANTONIO - technolabs
Cc: netfilter@vger.kernel.org
Subject: Re: Connecting an host with a subnet to a LAN with different subnet
There may be subtlties to your problem that this solution cannot address,
but a simpler solution and one that I've used many times is to give the
machine a secondary IP address on the same interface.
i.e. "ifconfig eth0:1 192.168.0.x"
Then both addresses are present on the system.
Regards,
Brad
On Wed, 27 Aug 2008, DI BACCO ANTONIO - technolabs wrote:
>
>
> I have a LAN with a given subnet, let us say: 192.168.0.0/24 with a lot
> of hosts. Now I want to connect another host (PLUTO) with an interface
> that has address 10.10.10.1 and netmask 255.255.255.0. I can't change
> this ip address but I want to insert some iptables rules on PLUTO to
> translate both source and dest ip address of the packets it receives to
> subnet 10.10.10.0/24 and viceversa. I think that target NETMAP can help
> me, but I'm getting confused.
>
> Bye,
> Antonio.
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Connecting an host with a subnet to a LAN with different subnet
2008-08-28 7:10 ` DI BACCO ANTONIO - technolabs
@ 2008-08-28 21:04 ` James King
0 siblings, 0 replies; 5+ messages in thread
From: James King @ 2008-08-28 21:04 UTC (permalink / raw)
To: DI BACCO ANTONIO - technolabs; +Cc: bsilva, netfilter
On Thu, Aug 28, 2008 at 12:10 AM, DI BACCO ANTONIO - technolabs
<Antonio.DiBacco@technolabs.it> wrote:
> This can be a good solution but my problem is that PLUTO cannot have the 192.168.0.x address at all.
Then your only other option is to add a secondary IP address in the
10.10.10.0/24 subnet on the router for the 192.168.0.0/24 subnet. You
need to have at least one device numbered in both subnets (although
not necessarily on the same physical interface) in order to route
packets between them.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-08-28 21:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-27 18:27 Connecting an host with a subnet to a LAN with different subnet DI BACCO ANTONIO - technolabs
2008-08-27 19:04 ` bsilva
2008-08-28 7:10 ` DI BACCO ANTONIO - technolabs
2008-08-28 21:04 ` James King
2008-08-27 19:36 ` Grant Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox