From: Jorge Sanchez Date: Fri, 21 Oct 2005 09:02:14 +0000 Subject: [LARTC]MASQed network to exit on different ext IP addres Message-Id: <4358AE96.7020507@inway.cz> 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 following problem. Looks like this ROUTER --------------DEF.GWa aaa.aaa.aaa.aaa | DEF.GWb bbb.bbb.bbb.bbb | ---------------- ------------------- | | VLAN0015 ETH0 ----- xxx.xxx.xxx.xxx 10.0.0.0/24 (alias on eth0) -- fff.fff.fff.fff.fff i need that all traffic from subnet 10.0.0.0/24 goes out masqueraded with ip address of alias on eth0 (fff.fff.fff.fff) and have default gw bbb.bbb.bbb.bbb . There is obsolote kernel 2.2.25 and iproute ver. iproute2-ss991023 with ipchains version ipchains 1.3.8, 27-Oct-1998 I tried folowing /usr/sbin/ip rule add prio 100 dev vlan0015 lookup 15 (here i tried also to do prio 100 from 10.0.0.0/24 lookup 15 ) /usr/sbin/ip route add default via bbb.bbb.bbb.bbb table 15 (here i tried to add src fff.fff.fff.fff, but no effect) /usr/sbin/ip route flush cache ipchains -A fwdmasq -i vlan+ -j MASQ ipchains -A forward -j fwdmasq -s 10.0.0.0/24 i tried also source nat with the iproute but no way, /usr/sbin/ip rule add prio 100 from 10.0.0.0/24 nat fff.fff.fff.fff lookup 15 The problem is that packets are still leaving router with ip addres xxx.xxx.xxx.xxx instead of fff.fff.fff.fff. thanks a lot Jorge Sanchez _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc