Metasploit has an inbuilt meterpreter script, that allows us to add a route and enables us to attack other machines in the network using the current one. The concept is really simple; all we have to do is execute this:
run autoroute –s <IP subnet>

Once this is done, we can simply exploit the machines using the same methods that we covered in the previous recipes.