From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rimas" Subject: MASQUERADE for 2 Internet connections Date: Mon, 9 Sep 2002 12:56:06 +0100 Sender: netfilter-admin@lists.netfilter.org Message-ID: <005a01c257f7$e2e51dc0$6e69690a@rimas> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0057_01C25800.4324E190" Return-path: Errors-To: netfilter-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: To: netfilter@lists.netfilter.org This is a multi-part message in MIME format. ------=_NextPart_000_0057_01C25800.4324E190 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi folks, I have configured NAT for 1 Inet connection :=20 iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE - working solution I use 10.105.105.x internal IP addresing Now I have a second one Inet connection (eth2). How to make MASQUERADE like this: 1st Inet - MASQUERADE for 10.105.105.100-105 2nd Inet - MASQUERADE for 10.105.105.xx for all except 100-105 Basicly to use the same IP addresing for both Inet connections Thanks in advance Rimas ------=_NextPart_000_0057_01C25800.4324E190 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi folks,
 
I have configured NAT for 1 Inet = connection :=20
iptables -t nat -A POSTROUTING = -o eth0 -j=20 MASQUERADE - working solution
 
I use 10.105.105.x internal IP=20 addresing
 
Now I have a second one Inet connection = (eth2).
 
How to make MASQUERADE like = this:
1st Inet - MASQUERADE for=20 10.105.105.100-105
2nd Inet - MASQUERADE for 10.105.105.xx = for all=20 except 100-105
 
Basicly to use the same IP addresing = for both Inet=20 connections
 
 
 
Thanks in advance
 
Rimas
 
------=_NextPart_000_0057_01C25800.4324E190-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Antony Stone Subject: Re: MASQUERADE for 2 Internet connections Date: Mon, 9 Sep 2002 13:16:03 +0100 Sender: netfilter-admin@lists.netfilter.org Message-ID: <200209091216.g89CG9v05332@vulcan.rissington.net> References: <005a01c257f7$e2e51dc0$6e69690a@rimas> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <005a01c257f7$e2e51dc0$6e69690a@rimas> Errors-To: netfilter-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Content-Type: text/plain; charset="us-ascii" To: netfilter@lists.netfilter.org On Monday 09 September 2002 12:56 pm, Rimas wrote: > Hi folks, > > I have configured NAT for 1 Inet connection : > iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE - working solution > > I use 10.105.105.x internal IP addresing > > Now I have a second one Inet connection (eth2). > > How to make MASQUERADE like this: > 1st Inet - MASQUERADE for 10.105.105.100-105 > 2nd Inet - MASQUERADE for 10.105.105.xx for all except 100-105 MASQUERADING is not your problem. All you need to do is have two rules: iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE iptables -A POSTROUTING -t nat -o eth2 -j MASQUERADE That will masquerade all packets going out of the two external interfaces. The tricky bit is to get your routing to direct packets from 10.105.105.100-105 via eth0 and to direct packets from the rest of 10.105.105.0/24 via eth2. To do this you need to investigate iproute2 http://defiant.coinet.com/iproute2 It's not difficult - but it's not netfilter. Antony. -- If you want to be happy for an hour, get drunk. If you want to be happy for a year, get married. If you want to be happy for a lifetime, get a garden. From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Nikodim Nikodimov" Subject: Re: MASQUERADE for 2 Internet connections Date: Mon, 9 Sep 2002 16:53:38 +0300 Sender: netfilter-admin@lists.netfilter.org Message-ID: <00d101c25808$4c867ca0$37d2a8c0@nikodimov> References: <005a01c257f7$e2e51dc0$6e69690a@rimas> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00CE_01C25821.71C2EBC0" Return-path: Errors-To: netfilter-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: To: netfilter@lists.netfilter.org This is a multi-part message in MIME format. ------=_NextPart_000_00CE_01C25821.71C2EBC0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Why you don't maquerade the hole net? iptables -A POSTROUTING -t nat -s 10.105.105.0/24 -d 0.0.0.0/0.0.0.0 -o = eth0 -j MASQUERADE ----- Original Message -----=20 From: Rimas=20 To: netfilter@lists.netfilter.org=20 Sent: Monday, September 09, 2002 2:56 PM Subject: MASQUERADE for 2 Internet connections Hi folks, I have configured NAT for 1 Inet connection :=20 iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE - working = solution I use 10.105.105.x internal IP addresing Now I have a second one Inet connection (eth2). How to make MASQUERADE like this: 1st Inet - MASQUERADE for 10.105.105.100-105 2nd Inet - MASQUERADE for 10.105.105.xx for all except 100-105 Basicly to use the same IP addresing for both Inet connections Thanks in advance Rimas ------=_NextPart_000_00CE_01C25821.71C2EBC0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Why you don't maquerade the hole = net?
 
 iptables -A POSTROUTING -t nat -s = 10.105.105.0/24 -d 0.0.0.0/0.0.0.0 -o eth0 -j MASQUERADE
 
----- Original Message -----
From:=20 Rimas=20
To: netfilter@lists.netfilter.o= rg=20
Sent: Monday, September 09, = 2002 2:56=20 PM
Subject: MASQUERADE for 2 = Internet=20 connections

Hi folks,
 
I have configured NAT for 1 Inet = connection :=20
iptables -t nat -A POSTROUTING = -o eth0 -j=20 MASQUERADE - working solution
 
I use 10.105.105.x internal IP=20 addresing
 
Now I have a second one Inet = connection=20 (eth2).
 
How to make MASQUERADE like = this:
1st Inet - MASQUERADE for=20 10.105.105.100-105
2nd Inet - MASQUERADE for = 10.105.105.xx for all=20 except 100-105
 
Basicly to use the same IP addresing = for both=20 Inet connections
 
 
 
Thanks in advance
 
Rimas
 
------=_NextPart_000_00CE_01C25821.71C2EBC0--