I need to test my software runs across the internet, i.e. two machines can talk to each other via host addresses and name resolution with routers and port-forwarding in between. What's the best way to do this? I can use any OS and set up on VMs.
Machine A | Router | Modem/Internet/WAN? | DNS Server | Modem/Internet/WAN? | Router | Machine B
Basically I need to simulate a machine having an internal IP address hidden to the other machine and the machine only accessible via another IP address (the router) with port forwarding.