NAT same subnets
I'm trying to setup a somewhat unusual setup, and I'm not sure if it is even possible. I was hoping someone could give me some tips or topics to search for to point me in the right direction.
I have a production network on 10.x.x.x and I want to setup a mirror of this network on an ESXi box for testing purposes. If possible, I'd like to set it up so that the testing network has the same IPs as the production network. Accordingly, I was hoping it would be possible to set up a pfSense VM as the gateway to the private network in the ESXi box doing NAT such that the production network sees the testing network at 10.128+x.x.x and vice versa. I.e. if I have boxes on my production network at 10.2.3.4 and 10.5.6.7, I want to be able to ping 10.130.3.4 from 10.5.6.7, have it routed to the pfSense VM, which NATs the destination to 10.2.3.4 and the source to 10.133.6.7 and the passes it on into the private network contained in the ESXi box, and vice versa from pinging from inside the test network.
Is this doable with pfSense? If so, how?
To do what you want, I think you will either need two pfSense VMs connected in series to handle the double NAT necessary or on your production network's gateway either setting up another subnet, some outbound NAT, or 1:1 NAT.
What Efonne said. The box that's connected to the real 10.x.x.x network can't be the same box connected to the test 10.x.x.x network (can't have the same network on diff NICs of any router/firewall). Just put one box between those two and you're good, you can 1:1 NAT the subnet as needed. Though I'd recommend extreme caution, without knowing a lot more about the network than any of us possibly could it's hard to say what ramifications are possible there, but make sure nothing can leak from test to production to break things. It's commonly preferable to have them 100% isolated for that reason, though that's not always practical or possible.
OK, I ordered the pfSense book, but it appears to be backordered on amazon, so I guess I'll ask a few more questions. I'm a bit confused about having 2 routers in series. Do I have it go prod network <-> (10.0/9 / 10.128/9) <-> (10.128/9 / 10.0/9) <-> test network? I'm having a hard time picturing how that would work.