All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] SNAT and multiply real addresses ?
@ 2005-02-11 11:39 raptor
  0 siblings, 0 replies; only message in thread
From: raptor @ 2005-02-11 11:39 UTC (permalink / raw)
  To: lartc

hi, I have a real networks on the eth0 side and real network on the eth1 side. 

a.a.a.0/24
x.x.x.0/24  <eth0--SNAT-box--eth1:0> y.y.y.2/24  <==> y.y.y.1/24 <==>INTERNET
z.z.z.0/24

I want to nat those behind eth0 to go out as y.y.y.0/24
(eth1 is with another address different gw and address, so that i'm using eth1:0 and separate rule&table)
I'm currently tring to do it this way :

ifconfig eth1:0 y.y.y.2 netmask 255.255.255.0
ip route add default via y.y.y.1 table eth10-net
ip rule from x.x.x.0/24 lookup eth10-net
iptables -t nat -A POSTROUTING -s x.x.x.0/24 -j SNAT --to-source y.y.y.3-y.y.y.254

doesn't seem to work.. the problem is that the eth1 interface have y.y.y.2 but not the all
the addresses i need to have on eth1 interface... Probably I can set ~250 eth1 aliases
but this will be overkill.
?!?! Is there any other solution...!?!?
I can do also :
iptables -t nat -A POSTROUTING -s x.x.x.Z -j SNAT --to-source y.y.y.Z
and it works, but then again this is one IP scenario ?

I dont have access to y.y.y.1/24 device.




-----
http://linuxtoday.com/news_story.php3?ltsn 04-12-08-004-32-OS-BZ-DT-0005
snip> MS Office is popular in the same way as heart disease is the most popular way to die.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-02-11 11:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-11 11:39 [LARTC] SNAT and multiply real addresses ? raptor

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.