I'm using autossh and set it up like shown in the following example: http://surniaulula.com/2012/12/10/autossh-startup-script-for-multiple-tunnels/
I found it works really well, but need some clarification. Particularly, the difference between 127.0.0.1 and * in the following examples:
ForwardPort=(
"L 127.0.0.1:3397:127.0.0.1:3306"
)
versus
ForwardPort=(
"L *:3397:127.0.0.1:3306"
)
The first one seems to do the redirect if coming from the host machine itself, where the 2nd seems to forward from anywhere. To me this translated as if the * was for any IP to forward the traffic through, but someone told me that it just says for any adapter on the machine. I'm curious is it any IP, or any adapter? I assume the end result is the same, but would like clarification for my own understanding.
Update
I updated my test to include a specific IP of a network I'm using and then tried to connect to the port and found that it did not work with the specific port specified, e.g.
ForwardPort=(
"L x.x.x.x:3397:127.0.0.1:3306"
"L 127.0.0.1:3397:127.0.0.1:3306"
)
Since this did not work, it makes me believe my buddy was right about the adapters. I am thus seeking details of how the adapter stuff works.