MASQed network to exit on different ext IP addres

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux