From mboxrd@z Thu Jan 1 00:00:00 1970 From: "raptor@tvskat.net" Date: Fri, 11 Feb 2005 11:39:27 +0000 Subject: [LARTC] SNAT and multiply real addresses ? Message-Id: <20050211133927.15afb63d@bugs> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org 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 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/