Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two servers server1 and server2 from server1 issue the following command

ssh user2@server2 -N -R 9080:localhost:80

Now from server2 I issue the following command:

wget http://localhost:9080

this works the file downloaded by wget is the file hosted by the webserver running on server1:80

From a independent machine I issue the following command

wget http://server2:9080

This doesn't work - the command eventually times out. I don't see any clues in server2's syslogs.

I've replaced all my firewall rules on server2 with:

iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT

iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
share|improve this question

From the independent machine, connect to

wget http://server1:80

...and let server1's SSH tunnel carry it to server2's 9080 port.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .