Accessing a remoted forwarded port from a third host
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
No comments:
Post a Comment