I have a 2621 router with FE0 attached to the Internet and FE1 attached to the LAN.2621 FE0 X.X.X.1/29 (part of public IP block, 'outside' NAT interface) FE1 a.a.a.1/24 (private, 'inside' NAT interface)
I have two goals here, both of which I can do, I just want a better way to do them.
The first goal is to simply "port forward" public IP X.X.X.2 to LAN IP a.a.a.2, which is simple enough with destination NAT:[source ][dest X.X.X.2] DestNAT-> [source ][dest a.a.a.2]
The second goal is where I started making stuff up. Because in addition to being destination NATed to "b.b.b.6", public IP X.X.X.3 must also be source NATed to appear to have originated on the b.b.b.0 subnet. So for lack of a better idea, I did this:
First I destination NAT it to the appropriate LAN address:[source ][dest X.X.X.3] DestNAT-> [source ][dest b.b.b.6]
My hack solution is to then route it to a second 2621 router:
ip route b.b.b.0/24 -> a.a.a.5
And the second 2621 looks like this:2621 #2 FE0 a.a.a.5/24 (inside) FE1 b.b.b.1/24 (outside)
And using a traditional internet connection sharing routine, I nat the source:[source ][dest b.b.b.6] SourceNAT -> [source b.b.b.1][dest b.b.b.6] ip route 0.0.0.0/0 -> a.a.a.1
So, from the perspective of the server at b.b.b.6, all the requests it's getting appear to be coming from LAN source b.b.b.1 (rather than WAN source ). Which accomplishes "the goal".
This works, but my question is, is it possible to do this with 1 router? Could I put, say, an NM-4E module into a single 2621 and route packets to "myself" so that I can destination NAT them as well as source NAT them?
I have to reproduce this at another location with the same goals, but at the other location there's only one 2621 router to play with.