@Universal_Simplexity something you can use to make this all easier is instead of a VM or in addition to your VM (set network as pass through of this is academic, otherwise build a proxy and yada yada) is setup Docker to host MongoDB, and then setup Kubernetes to handle all of the network and routing services to MongoDB.
You could also use Mininet as well.