* [LARTC] iptable for multiple ip address
@ 2002-09-12 13:35 James Ma
2002-09-12 14:54 ` Juan Antonio Morillas Cerezo
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: James Ma @ 2002-09-12 13:35 UTC (permalink / raw)
To: lartc
[-- Attachment #1: Type: text/plain, Size: 450 bytes --]
Hi, All,
So far, all the applications I have seen for Iptables are focusing on connecting a WAN with one IP address to a LAN and using NAT. My question is if the iptables support multiple IP address on WAN side? If so, how it works (you only have one NIC on WAN side)? Is static NAT (it might not be the right term, I mean a static and permanent connection between WAN IP address and LAN IP address) supported?
Thanks in advance,
James
[-- Attachment #2: Type: text/html, Size: 1139 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LARTC] iptable for multiple ip address
2002-09-12 13:35 [LARTC] iptable for multiple ip address James Ma
@ 2002-09-12 14:54 ` Juan Antonio Morillas Cerezo
2002-09-12 19:49 ` Jose Luis Domingo Lopez
2002-09-14 12:14 ` Eric Leblond
2 siblings, 0 replies; 4+ messages in thread
From: Juan Antonio Morillas Cerezo @ 2002-09-12 14:54 UTC (permalink / raw)
To: lartc
A fecha Thu, Sep 12, 2002 at 09:35:51AM -0400, James Ma dijo:
>
> So far, all the applications I have seen for Iptables are focusing on
> connecting a WAN with one IP address to a LAN and using NAT. My question is if
> the iptables support multiple IP address on WAN side? If so, how it works (you
> only have one NIC on WAN side)? Is static NAT (it might not be the right term,
> I mean a static and permanent connection between WAN IP address and LAN IP
> address) supported?
>
Yes, with iptables you can have more than one IP
address for each physical interface, both in "local" and
"external" places, then you have to add them as aliases with
ip, and do some NAT to connect each side, if there are private
IPs involved.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LARTC] iptable for multiple ip address
2002-09-12 13:35 [LARTC] iptable for multiple ip address James Ma
2002-09-12 14:54 ` Juan Antonio Morillas Cerezo
@ 2002-09-12 19:49 ` Jose Luis Domingo Lopez
2002-09-14 12:14 ` Eric Leblond
2 siblings, 0 replies; 4+ messages in thread
From: Jose Luis Domingo Lopez @ 2002-09-12 19:49 UTC (permalink / raw)
To: lartc
On Thursday, 12 September 2002, at 16:54:03 +0200,
Juan Antonio Morillas Cerezo wrote:
> Yes, with iptables you can have more than one IP
> address for each physical interface, both in "local" and
> "external" places, then you have to add them as aliases with
> ip, and do some NAT to connect each side, if there are private
> IPs involved.
>
I would add the following. If what the original poster wants is to
somehow give a LAN with private IP addressing access to the Internet
using not a simple public IP address, but a pool of them, you easily
can. Just create an iptables rule with a SNAT target like this:
iptables -t nat -A POSTROUTING --out-interface $WAN_IF \
--jump SNAT --to-source $START_PUB_IP-$END_PUB_IP
The only limitation I see with this approach is that IP addresses must
be contiguous, but I think this is a typical scenario, because our ISP
tend to give addresses in blocks :)
Hope this helps.
--
Jose Luis Domingo Lopez
Linux Registered User #189436 Debian Linux Woody (Linux 2.4.19-pre6aa1)
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LARTC] iptable for multiple ip address
2002-09-12 13:35 [LARTC] iptable for multiple ip address James Ma
2002-09-12 14:54 ` Juan Antonio Morillas Cerezo
2002-09-12 19:49 ` Jose Luis Domingo Lopez
@ 2002-09-14 12:14 ` Eric Leblond
2 siblings, 0 replies; 4+ messages in thread
From: Eric Leblond @ 2002-09-14 12:14 UTC (permalink / raw)
To: lartc
Le jeu 12/09/2002 à 21:49, Jose Luis Domingo Lopez a écrit :
> iptables -t nat -A POSTROUTING --out-interface $WAN_IF \
> --jump SNAT --to-source $START_PUB_IP-$END_PUB_IP
>
> The only limitation I see with this approach is that IP addresses must
> be contiguous, but I think this is a typical scenario, because our ISP
> tend to give addresses in blocks :)
But you can put multiple --to-source so there's no limitation.
--
Eric Leblond
eric@regit.org
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-09-14 12:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-12 13:35 [LARTC] iptable for multiple ip address James Ma
2002-09-12 14:54 ` Juan Antonio Morillas Cerezo
2002-09-12 19:49 ` Jose Luis Domingo Lopez
2002-09-14 12:14 ` Eric Leblond
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.