Thanks for your reply. I investigated both options and neither were suitable. The proxy did not work because I required multiple connections. The VPN connection did not work because I did not have root access to the sshd server.
Originally Posted by superm1
Instead I came up with a less-than-elegant method and used rinetd. It is suitable for the temporary time I need the connection. To do this I did the following:
1) Set up virtual network devices
2) for all the web servers I wanted to connect to I added them in the /etc/hosts file and pointed them to the virtual network device:
sudo ifconfig eth0:1 192.168.0.128 netmask 255.255.255.0
sudo ifconfig eth0:2 192.168.0.129 netmask 255.255.255.0
3) Then I needed to redirect the localhost ports with rinetd. In the /etc/rinetd.conf file I added the following:
4) Then I set up my SSH tunnel
# bindadress bindport connectaddress connectport
192.168.0.128 80 127.0.0.1 82
192.168.0.129 80 127.0.0.1 81
This acted like a transparent proxy. Although the method is not ideal, it works. This would be much more elegant using iptables.
sudo ssh -f simon@$SSHD_SERVER -L 81:18.104.22.168:80 -L 82:22.214.171.124:80