I've setup a remote ssh tunnel from my Raspberry Pi, which is behind a NAT, to my vServer using the follow command:
ssh -ngNTfR 62.75.145.118:2209:localhost:22 [email protected]
62.75.145.118 is the A record of unkn0wn3d.com
I've set
GatewayPorts clientspecified
on unkn0wn3d.com sshd_config.
When I now try to connect directly to my Pi via
ssh [email protected] -p 2209
it says
ssh: connect to host unkn0wn3d.com port 2209: Connection refused
Netstat outputs
# netstat -a | grep 2209
tcp 0 0 localhost.localdom:2209 *:* LISTEN
Edit:
iptables output:
# iptables -L
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
I've set the GatewayPorts to clientspecified on the vServer. The Raspberry Pi has Gatewayports still set to no.
I can reproduce the issue, the errors remain the same.
netstat
output in your question is what would be expected in case the configuration saidGatewayPorts no
. Could you go over the debugging steps mentioned in your question again and verify that you can in fact reproduce it as described? Are you certain you editedsshd_config
on the correct server and reloaded the configuration file afterwards?