All of lore.kernel.org
 help / color / mirror / Atom feed
* MASQUERADE for 2 Internet connections
@ 2002-09-09 11:56 Rimas
  2002-09-09 12:16 ` Antony Stone
  2002-09-09 13:53 ` Nikodim Nikodimov
  0 siblings, 2 replies; 3+ messages in thread
From: Rimas @ 2002-09-09 11:56 UTC (permalink / raw)
  To: netfilter

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

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

Basicly to use the same IP addresing for both Inet connections



Thanks in advance

Rimas

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

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

* Re: MASQUERADE for 2 Internet connections
  2002-09-09 11:56 MASQUERADE for 2 Internet connections Rimas
@ 2002-09-09 12:16 ` Antony Stone
  2002-09-09 13:53 ` Nikodim Nikodimov
  1 sibling, 0 replies; 3+ messages in thread
From: Antony Stone @ 2002-09-09 12:16 UTC (permalink / raw)
  To: netfilter

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.


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

* Re: MASQUERADE for 2 Internet connections
  2002-09-09 11:56 MASQUERADE for 2 Internet connections Rimas
  2002-09-09 12:16 ` Antony Stone
@ 2002-09-09 13:53 ` Nikodim Nikodimov
  1 sibling, 0 replies; 3+ messages in thread
From: Nikodim Nikodimov @ 2002-09-09 13:53 UTC (permalink / raw)
  To: netfilter

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

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: Rimas 
  To: netfilter@lists.netfilter.org 
  Sent: Monday, September 09, 2002 2:56 PM
  Subject: MASQUERADE for 2 Internet connections


  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

  Basicly to use the same IP addresing for both Inet connections



  Thanks in advance

  Rimas


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

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

end of thread, other threads:[~2002-09-09 13:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-09 11:56 MASQUERADE for 2 Internet connections Rimas
2002-09-09 12:16 ` Antony Stone
2002-09-09 13:53 ` Nikodim Nikodimov

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.