Using iptables on a single NIC to map old IP addresses onto new.
Quoted 4 lines
Quoted 4 lines
I want to map all ports on a.a.a.2 to b.b.b.2 and all ports on a.a.a.3 to
b.b.b.3
Quoted 8 lines
Quoted 3 lines
Can something like this be done using iptables if I only have 1 NIC card and I do not have a physically separate subnet?
Why not use "ifconfig" (or "ip addr") to add multiple IP addresses (old and new) to the NIC ?
Then, when the transition is complete, you just remove the old addresses.
That was my first thought. I bound a.a.a.2 and b.b.b.2 to the same box. I obviously have two pipes. If I set the default route on the box to the a.a.a.1 router I can ping a.a.a.2 from the outside but not b.b.b.2. If I switch to the b.b.b.1 router the opposite happens.
arp cache has entries for both routers. I can ping both routers from the box in question.
I would have expected packets to come down either pipe and go out whichever one happens to be the default gateway.
I've been assuming either it's some issue on the routers themselves or there is some issue with the 2.2 kernel and binding IPs from separate networks (old machine which I can't take down yet.) but it's been alot of long hours and little sleep so maybe I'm missing something stupidly obvious.
Signature · 4 lines
---------------------------------------------------------------------
DTLink Software http://www.dtlink.com
Internet Business Systems and Software
---------------------------------------------------------------------Terve,
Quoted 7 lines · Yermo Lamers
That was my first thought. I bound a.a.a.2 and b.b.b.2 to the same box. I obviously have two pipes. If I set the default route on the box to the a.a.a.1 router I can ping a.a.a.2 from the outside but not b.b.b.2. If I switch to the b.b.b.1 router the opposite happens.
I would have expected packets to come down either pipe and go out whichever one happens to be the default gateway.
It could be that both your ISPs are using source address spoofing filters (as they should, of course). That is, the router a.a.a.1 will only accept traffic with source address a.a.a.2 and the rest (including ping replies from b.b.b.2) get dropped.
Ville
Signature · 4 lines
Ville Mattila, System Support Specialist, Funet network, CSC PO Box 405, FIN-02101 Espoo, Finland, fax +385 9 457 2302 CSC is the Finnish IT Center for Science, http://www.csc.fi/, email: [email protected]