ポート転送エラー

ポート転送エラー

このガイドに従ってKVMゲストでVNCを使用しようとしています。

http://blog.scottlowe.org/2013/08/21/accessing-vnc-consoles-of-kvm-guests-via-ssh/

これはホストが使用する ssh コマンドです。

ssh -v -v -4 [email protected] -L 7000:127.0.0.1:7000

192.168.122.123 はゲストのアドレスです。

上記のコマンドを使用してゲストにSSHとして接続できますが、ホストでremminaを使用し、127.0.0.1:7000VNCプロトコルを使用してサーバーフィールドにSSHを使用すると、ゲストSSH接続に次のメッセージが表示されます.

root@Kali:~# debug1: Connection to port 7000 forwarding to 127.0.0.1 port 7000 requested.
debug2: fd 8 setting TCP_NODELAY
debug2: fd 8 setting O_NONBLOCK
debug1: channel 2: new [direct-tcpip]
channel 2: open failed: connect failed: Connection refused
debug2: channel 2: zombie
debug2: channel 2: garbage collecting
debug1: channel 2: free: direct-tcpip: listening port 7000 for 127.0.0.1 port 7000, connect from 127.0.0.1 port 59293 to 127.0.0.1 port 7000, nchannels 3

SSH接続を確立した後、私のホストのポート7000出力は次のようになります。

# sudo netstat -tunelp | grep LISTEN
tcp        0      0 127.0.0.1:7000          0.0.0.0:*               LISTEN      1000       283620      8509/ssh

私のゲストのファイルには次の行がありますsshd_config

GatewayPorts yes
AllowTcpForwarding yes
X11Forwarding yes

どんなアイデアがありますか?

ベストアンサー1

guestに127.0.0.1:7000リスナーがありません。0.0.0.0:7000次のコマンドを使用してゲストのリスナーを確認します。

netstat -an|grep 7000

同様の行があるかx.x.x.x:7000 0.0.0.0:* LISTEN、どのインターフェイスにバインドされているかを確認してください。

このGatewayPortsディレクティブはリモートポート転送にのみ適用されるため、この構成では意味がありません。

おすすめ記事