0

I was trying to forward my 80 access to 8080 with IPTABLES without success, then I read this answer

And it finally worked for me, after all the IPTABLES configurations I tried this command made it..

sudo ssh -gL 80:127.0.0.1:8080 localhost

what does this command really do?

1 Answer 1

1

in command sudo ssh -gL 80:127.0.0.1:8080 localhost

option -g - Allows remote hosts to connect to local forwarded ports
option -L - [bind_address:]port:host:hostport
             Specifies that the given port on the local (client) host is to be
             forwarded to the given host and port on the remote side.  This
             works by allocating a socket to listen to port on the local side,
             optionally bound to the specified bind_address.  Whenever a
             connection is made to this port, the connection is forwarded over
             the secure channel, and a connection is made to host port
             hostport from the remote machine.  Port forwardings can also be
             specified in the configuration file.  

traffic from port 80 redirected to port 8080 on localhost

You must log in to answer this question.

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