Skip to contentSkip to conversation

Problem with 2 NAT and 2 ROUTE

DISCUSSION Cristian Seva (VOIPLAB) 2 participants 2 messages Aug 23, 2004 – Aug 24, 2004

lore
Share & tools
lore
#0 lore raw

have a problem with mi linux BOX

Eth0 =  192.168.0.254  (RED A)
Eth1 =  200.69.123.177/130  (LINK A)
Eth2 =  192.168.0.100  (RED B)
Eth3 =  192.168.1.1 para el PPPOE

ppp0= DynamicIP (LINK B)
-------------------------------------------------------------------
-DEFAULT ROUTE
200.69.123.178 (LINKA)
ppp0 (cdo establece el PPPOE)
-------------------------------------------------------------------
-IPTABLES NAT RULES
iptables -t nat -A POSTROUTING -s 192.168.0.0/255.255.255.128 -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 192.168.0.128/255.255.255.128 -o eth1 -j MASQUERADE
-------------------------------------------------------------------

My problem is the only NAT works is the NAT with march with de default route..

Can any one helme?

#1 lore raw
Quoted 19 lines · Cristian Seva (VOIPLAB)

have a problem with mi linux BOX

Eth0 =  192.168.0.254  (RED A)
Eth1 =  200.69.123.177/130  (LINK A)
Eth2 =  192.168.0.100  (RED B)
Eth3 =  192.168.1.1 para el PPPOE

ppp0= DynamicIP (LINK B)
-------------------------------------------------------------------
-DEFAULT ROUTE
200.69.123.178 (LINKA)
ppp0 (cdo establece el PPPOE)
-------------------------------------------------------------------
-IPTABLES NAT RULES
iptables -t nat -A POSTROUTING -s 192.168.0.0/255.255.255.128 -o ppp0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 192.168.0.128/255.255.255.128 -o eth1 -j MASQUERADE
-------------------------------------------------------------------

Quoted 5 lines

My problem is the only NAT works is the NAT with march with de default route..

Can any one helme?

I think you need Advanced Routing using iproute2 nexthop facility to send the traffic to both routers, and then masquerade the connections, masquerading does know who to send the traffic but it doesn't know how to do it.

Signature · 12 lines
Jose Maria Lopez Hernandez
Director Tecnico de bgSEC
[email protected]
bgSEC Seguridad y Consultoria de Sistemas Informaticos
http://www.bgsec.com
ESPAÑA

The only people for me are the mad ones -- the ones who are mad to live,
mad to talk, mad to be saved, desirous of everything at the same time,
the ones who never yawn or say a commonplace thing, but burn, burn, burn
like fabulous yellow Roman candles.
                -- Jack Kerouac, "On the Road"