Minecraftサーバー用のリバースSSHトンネリング

Minecraftサーバー用のリバースSSHトンネリング

質問全体をお読みください。下部に非常に重要な情報があります!

リバースSSHトンネルを使用して、My VPSのポート25565(IPアドレスXXXX)へのすべてのトラフィックをマイPCのポート25565(IPアドレスYYYY)に転送しようとしています。私が使用するコマンドは次のとおりです。

ssh -f -v -N -T -R25565:localhost:25565 X.X.X.X (on my home PC)
ssh -v -p 25565 kevin@localhost (on my VPS)

ただし、2番目のコマンドは正常に実行され、最初は約20秒間接続され、終了してマークされますkex_exchange_identification: Connection closed by remote host。 VPSと自宅のコンピュータの両方にファイルがありますGatewayPorts=yessshd_config私のMinecraftサーバーに接続しようとすると、2番目のコマンドを実行してから約20秒以内にタイムアウトが発生します。最初のコマンドは正常に実行されます。

私のVPSの場合、実行するとsudo tail -n300 /var/log/auth.log | grep "ssh"次のようになります。

Apr 17 18:04:56 ubuntu-s-1vcpu-1gb-lon1-01 sshd[2189]: Server listening on 0.0.0.0 port 22.
Apr 17 18:04:56 ubuntu-s-1vcpu-1gb-lon1-01 sshd[2189]: Server listening on :: port 22.
Apr 17 18:04:56 ubuntu-s-1vcpu-1gb-lon1-01 sshd[2189]: Server listening on 0.0.0.0 port 80.
Apr 17 18:04:56 ubuntu-s-1vcpu-1gb-lon1-01 sshd[2189]: Server listening on :: port 80.
Apr 17 18:04:56 ubuntu-s-1vcpu-1gb-lon1-01 sshd[2189]: Server listening on 0.0.0.0 port 443.
Apr 17 18:04:56 ubuntu-s-1vcpu-1gb-lon1-01 sshd[2189]: Server listening on :: port 443.
Apr 17 18:07:00 ubuntu-s-1vcpu-1gb-lon1-01 sshd[2191]: Accepted publickey for kevin from 147.147.74.12 port 34680 ssh2: RSA SHA256:ZK8Guh7WfKkthpCpwtH1vg5izkyWGe24OusFPbCaqz8
Apr 17 18:08:09 ubuntu-s-1vcpu-1gb-lon1-01 sshd[2208]: error: kex_exchange_identification: Connection closed by remote host
Apr 17 18:08:09 ubuntu-s-1vcpu-1gb-lon1-01 sshd[2209]: Invalid user  from 45.227.254.10 port 1356
Apr 17 18:08:09 ubuntu-s-1vcpu-1gb-lon1-01 sshd[2209]: Connection closed by invalid user  45.227.254.10 port 1356 [preauth]
Apr 17 18:11:09 ubuntu-s-1vcpu-1gb-lon1-01 sshd[2217]: Accepted publickey for kevin from 147.147.74.12 port 34812 ssh2: RSA SHA256:ZK8Guh7WfKkthpCpwtH1vg5izkyWGe24OusFPbCaqz8
Apr 17 18:11:29 ubuntu-s-1vcpu-1gb-lon1-01 sshd[2221]: Unable to negotiate with 194.146.224.65 port 34273: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1 [preauth]
Apr 17 18:12:31 ubuntu-s-1vcpu-1gb-lon1-01 sshd[2233]: Accepted publickey for kevin from 147.147.74.12 port 34832 ssh2: RSA SHA256:ZK8Guh7WfKkthpCpwtH1vg5izkyWGe24OusFPbCaqz8
Apr 17 18:13:12 ubuntu-s-1vcpu-1gb-lon1-01 sshd[2237]: Received disconnect from 221.181.185.220 port 58408:11:  [preauth]
Apr 17 18:13:12 ubuntu-s-1vcpu-1gb-lon1-01 sshd[2237]: Disconnected from authenticating user root 221.181.185.220 port 58408 [preauth]
Apr 17 18:13:47 ubuntu-s-1vcpu-1gb-lon1-01 sshd[2242]: Accepted publickey for kevin from 147.147.74.12 port 34854 ssh2: RSA SHA256:ZK8Guh7WfKkthpCpwtH1vg5izkyWGe24OusFPbCaqz8
Apr 17 18:17:23 ubuntu-s-1vcpu-1gb-lon1-01 sshd[2251]: error: kex_exchange_identification: banner line contains invalid characters
Apr 17 18:17:23 ubuntu-s-1vcpu-1gb-lon1-01 sshd[2252]: error: kex_exchange_identification: banner line contains invalid characters
Apr 17 18:17:23 ubuntu-s-1vcpu-1gb-lon1-01 sshd[2252]: error: send_error: write: Connection reset by peer
Apr 17 18:17:25 ubuntu-s-1vcpu-1gb-lon1-01 sshd[2253]: error: kex_exchange_identification: client sent invalid protocol identifier "GET / HTTP/1.1"
Apr 17 18:17:25 ubuntu-s-1vcpu-1gb-lon1-01 sshd[2254]: error: kex_exchange_identification: client sent invalid protocol identifier "GET / HTTP/1.1"
Apr 17 18:17:26 ubuntu-s-1vcpu-1gb-lon1-01 sshd[2255]: Connection reset by authenticating user root 66.228.33.98 port 50894 [preauth]
Apr 17 18:17:26 ubuntu-s-1vcpu-1gb-lon1-01 sshd[2257]: Connection reset by authenticating user root 69.164.222.108 port 55782 [preauth]
Apr 17 18:20:26 ubuntu-s-1vcpu-1gb-lon1-01 sudo:    kevin : TTY=pts/0 ; PWD=/etc/ssh ; USER=root ; COMMAND=/usr/bin/tail -n300 /var/log/auth.log
Apr 17 18:22:28 ubuntu-s-1vcpu-1gb-lon1-01 sudo:    kevin : TTY=pts/0 ; PWD=/etc/ssh ; USER=root ; COMMAND=/usr/sbin/ufw allow 25565
Apr 17 18:24:02 ubuntu-s-1vcpu-1gb-lon1-01 sudo:    kevin : TTY=pts/0 ; PWD=/etc/ssh ; USER=root ; COMMAND=/usr/bin/tail -n300 /var/log/auth.log

私の質問は次のとおりです

  1. 私は何が間違っていましたか? (何でも)
  2. 私の間違いをどのように修正できますか?

最終的に最大の質問は、XXXX:25565へのすべてのMinecraftトラフィックが物理サーバーが実行されているYYYY:25565に転送されるように、リバースSSHトンネルを操作する方法です。

XXXXがOpenVPNを実行しており、クライアントYYYYのOpenVPNサーバーとして機能することに注目する価値があります。

ベストアンサー1

おすすめ記事