I need to execute a python script ('python download.py end_host') from *local_host*. However, local_host has no route to reach *end_host*. local_host can reach '*middle_host*' and 'middle_host' can reach 'end_host'. The python script has to be executed at 'local_host'. It will make a query to the 'end_host' and get the corresponding response. Since 'local_host' and 'end_host' do not have an established route, the python script timesout.
How can I make the 'middle_host' act as a proxy to catch the command from 'local_host' and forward it to 'end_host' and again catch response from 'end_host' and pass it to 'local_host' ??