I would like to manually set up routing to subnet 188.8.131.52/16 through IP which is an alias: 184.108.40.206. IP alias is set up like that:
/sbin/ifconfig eth0:0 220.127.116.11 netmask 255.255.255.255 broadcast 18.104.22.168
At the beginning i tried something like that:
route add -net 22.214.171.124 netmask 255.255.0.0 gw 126.96.36.199 dev eth0
and everything worked just fine, until i got an email from my datacenter that IP address is sending wrong ARP packets:
Wed Jun 6 08:07:15 2012 : arp who-has 188.8.131.52 tell 184.108.40.206 Wed Jun 6 08:37:13 2012 : arp who-has 220.127.116.11 tell 18.104.22.168 Wed Jun 6 09:07:19 2012 : arp who-has 22.214.171.124 tell 126.96.36.199
Conversation with their support went to nothing and now i'm still trying to fix that. Another setup which worked (but still was sending these wrong ARP packets) was:
ip route add 188.8.131.52/16 via 184.108.40.206
i think this one internally worked just the same.
Next i tried configuring routing through iptables and SNAT. I enabled ip-forwarding and tried different crazy stuff like:
iptables -t nat -A POSTROUTING -s 220.127.116.11 -o eth0 -j SNAT --to-source 18.104.22.168-22.214.171.124 iptables -t nat -A POSTROUTING -s 126.96.36.199 -o eth0 -j SNAT --to-source 188.8.131.52-184.108.40.206 iptables -t nat -A POSTROUTING -s 220.127.116.11/16 -o eth0 -j SNAT --to 18.104.22.168 iptables -t nat -A PREROUTING -p tcp -d 22.214.171.124 -j DNAT --to-destination 126.96.36.199-188.8.131.52
None of these changed routing. Could anyone give me any sort of advice how to change route to this subnet without sending spare/wrong ARP packets?