0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

tailscaleを用いたVPN接続 パケットサイズによる疎通不可への対処

Posted at

背景

dk@daisei:~$ ssh -v user@{ip}
OpenSSH_9.6p1 Ubuntu-3ubuntu13.11, OpenSSL 3.0.13 30 Jan 2024
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to ip {ip} port 22.
debug1: Connection established.
debug1: identity file /home/dk/.ssh/id_rsa type 0
debug1: identity file /home/dk/.ssh/id_rsa-cert type -1
debug1: identity file /home/dk/.ssh/id_ecdsa type -1
debug1: identity file /home/dk/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/dk/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/dk/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/dk/.ssh/id_ed25519 type 3
debug1: identity file /home/dk/.ssh/id_ed25519-cert type -1
debug1: identity file /home/dk/.ssh/id_ed25519_sk type -1
debug1: identity file /home/dk/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/dk/.ssh/id_xmss type -1
debug1: identity file /home/dk/.ssh/id_xmss-cert type -1
debug1: identity file /home/dk/.ssh/id_dsa type -1
debug1: identity file /home/dk/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13.11
kex_exchange_identification: read: Connection reset by peer
Connection reset by {ip} port 22

エラー内容

SSH接続でノートPCから自宅のAlmaLinux PCへの疎通を試みた際に上記のエラーがでた。
ノートPC→自宅のUbuntuPC→AlmaLinux でのSSH接続はできたため。AlmaLinux 自体のSSHサーバーは死んでいないことが確認できた。それではなぜノートPC→AlmaLinux に入れないかGemini3.0proにきいてみた。すると、パケットサイズ(MTU)の差が原因だとでた。以下の2つの方法でパケットサイズを変えて確認してみろとのことで試してみた。

方法

小さいパケット(1200バイト)なら届くか確認

ping -s 1200 -c 4 100.118.28.61
PING 100.118.28.61 (100.118.28.61) 1200(1228) bytes of data.
1208 bytes from 100.118.28.61: icmp_seq=1 ttl=127 time=0.912 ms
1208 bytes from 100.118.28.61: icmp_seq=2 ttl=127 time=1.98 ms
1208 bytes from 100.118.28.61: icmp_seq=3 ttl=127 time=0.960 ms

大きいパケット(1400バイト以上)だと失敗しないか確認

ping -s 1450 -c 4 100.118.28.61
--- 100.118.28.61 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2051ms

結論

【対処法】 PC側のネットワークインターフェース(またはVPNインターフェース)のMTU値を 1280 程度に下げると解決することが多いです。
これを実施して、解決させようと思う。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?