I want to combine the functionality of two SSH tunnels set up through PuTTY.
The first tunnel is:
- PuTTY:
L8000 127.0.0.1:8000
(in SSH->Tunnels), and - Firefox: SOCKS (v5) Host:
127.0.0.1
, Port:8000
This lets me navigate to http://localhost:8000
on my local browser and connect to localhost:8000
on my remote server, which I use to access a web development server on that port.
The second tunnel simply uses PuTTY set to D8000
(with same Firefox settings), which lets me browse the internet at large through my remote server.
The problem is, I want to connect to, say, "google.com" and "localhost:8000" (on the remote server) in the same session. This is mainly because my web development server (tunnel 1) needs access to remote links (e.g. google APIs). I thought the dynamic port forward in tunnel 2 would work but I can no longer reach localhost:8000 on the remote server by navigating to localhost:8000 in the browser.
I have searched far and wide but I cannot find any answer. I suspect it's because the answer is too obvious :/
netstat -nptl output (with development server running)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:8000 0.0.0.0:* LISTEN 23172/python
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 574/sshd
tcp 0 0 0.0.0.0:11211 0.0.0.0:* LISTEN 572/memcached
tcp 0 0 127.0.0.1:38637 0.0.0.0:* LISTEN 27836/firefox
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN 27635/Xvfb
tcp 0 0 127.0.0.1:5454 0.0.0.0:* LISTEN 812/postgres
tcp6 0 0 :::3047 :::* LISTEN 574/sshd
tcp6 0 0 :::11211 :::* LISTEN 572/memcached
tcp6 0 0 :::6000 :::* LISTEN 27635/Xvfb
tcp6 0 0 :::8983 :::* LISTEN 257/java
netstat -ptl
(edit any sensitive IPs)netstat -nptl
which would have given port numbers instead of names, but I don't think those names correspond to 8000.netstat -tlpn
with the server running and it is listening on 8000