Skip to content

The SoftEther client in Docker connects to the server successfully using an IPv4 address, but when using an IPv6 address, it keeps retrying. #18

@qibao07

Description

@qibao07
docker run -d --restart unless-stopped --name softether-vpn-client \
  -v /etc/localtime:/etc/localtime:ro \
  -v /etc/timezone:/etc/timezone:ro \
  -v softether-client-data:/var/lib/softether \
  --cap-add NET_ADMIN \
  --device /dev/net/tun:/dev/net/tun \
  --net host \
  softethervpn/vpnclient
AccountDisconnect vpn
AccountDelete vpn
NicDelete vpn
NicCreate vpn
AccountCreate vpn /SERVER:v6.test.top:57713 /HUB:vpn /USERNAME:rpi-03 /NICNAME:vpn
AccountPasswordSet vpn /PASSWORD:*** /TYPE:standard
AccountStartupSet vpn
AccountConnect vpn

v6.test.top maps to an IPv6 address, while v4.test.top maps to an IPv4 address.

When I install SoftEther Client via apt, both IPv4 and IPv6 connections work fine. However, when running SoftEther Client in Docker, only IPv4 works. When using IPv6, the logs show that authentication succeeds, but the TCP connection cannot be established and keeps retrying.

Client log

2025-10-09 11:40:20.552 VPN Connection Setting "vpn": Connection operation starting (this is now 2 times).
2025-10-09 11:40:20.622 VPN Connection Setting "vpn": SSL communication has been started. The protocol version is TLSv1.3. The encryption algorithm name is "TLS_AES_256_GCM_SHA384".
2025-10-09 11:40:20.622 VPN Connection Setting "vpn": Now connected. Session name: "SID-RPI-03-1012"
2025-10-09 11:40:20.753 VPN Connection Setting "vpn": The connection has been either disconnected or it failed. Cause: Connection has been disconnected. (code 3)
2025-10-09 11:40:35.756 VPN Connection Setting "vpn": Connection operation starting (this is now 2 times).
2025-10-09 11:40:35.816 VPN Connection Setting "vpn": SSL communication has been started. The protocol version is TLSv1.3. The encryption algorithm name is "TLS_AES_256_GCM_SHA384".
2025-10-09 11:40:35.826 VPN Connection Setting "vpn": Now connected. Session name: "SID-RPI-03-1013"
2025-10-09 11:40:35.927 VPN Connection Setting "vpn": The connection has been either disconnected or it failed. Cause: Connection has been disconnected. (code 3)
2025-10-09 11:40:50.930 VPN Connection Setting "vpn": Connection operation starting (this is now 2 times).
2025-10-09 11:40:50.990 VPN Connection Setting "vpn": SSL communication has been started. The protocol version is TLSv1.3. The encryption algorithm name is "TLS_AES_256_GCM_SHA384".
2025-10-09 11:40:51.000 VPN Connection Setting "vpn": Now connected. Session name: "SID-RPI-03-1014"
2025-10-09 11:40:51.101 VPN Connection Setting "vpn": The connection has been either disconnected or it failed. Cause: Connection has been disconnected. (code 3)

Server log

2025-10-09 10:54:45.785 [HUB "VPN"] The connection "CID-56302" (IP address: 172.17.0.1, Host name: UBUNTU, Port number: 43384, Client name: "SoftEther VPN Client Developer Edition", Version: 5.02, Build: 5187) is attempting to connect to the Virtual Hub. The auth type provided is "Password authentication" and the user name is "rpi-03".
2025-10-09 10:54:45.785 [HUB "VPN"] Connection "CID-56302": Successfully authenticated as user "rpi-03".
2025-10-09 10:54:45.785 [HUB "VPN"] Connection "CID-56302": The new session "SID-RPI-03-945" has been created. (IP address: 172.17.0.1, Port number: 43384, Physical underlying protocol: "Standard TCP/IP (IPv4)")
2025-10-09 10:54:45.785 [HUB "VPN"] Session "SID-RPI-03-945": The parameter has been set. Max number of TCP connections: 2, Use of encryption: Yes, Use of compression: No, Use of Half duplex communication: No, Timeout: 20 seconds.
2025-10-09 10:54:45.785 [HUB "VPN"] Session "SID-RPI-03-945": VPN Client details: (Client product name: "SoftEther VPN Client Developer Edition", Client version: 502, Client build number: 5187, Server product name: "SoftEther VPN Server (64 bit) (Open Source)", Server version: 441, Server build number: 9787, Client OS name: "Alpine Linux", Client OS version: "6.12.47+rpt-rpi-2712", Client product ID: "--", Client host name: "rpi-03", Client IP address: "240e:3b5:xxx:xxx:3795:5739:xxx:8fba", Client port number: 35930, Server host name: "v6.test.top", Server IP address: "240e:3b5:xxx:xxx:caff:bfff:xxx:b80", Server port number: 57713, Proxy host name: "", Proxy IP address: "0.0.0.0", Proxy port number: 0, Virtual Hub name: "vpn", Client unique ID: "B95C6D1997A0CDAD4CEFFA8ADB106555")
2025-10-09 10:54:50.872 [HUB "VPN"] Session "SID-RPI-03-944": The session has been terminated. The statistical information is as follows: Total outgoing data size: 0 bytes, Total incoming data size: 0 bytes.
2025-10-09 10:54:50.893 Connection "CID-56301" terminated by the cause "The VPN session has been deleted. It is possible that either the administrator disconnected the session or the connection from the client to the VPN Server has been disconnected." (code 11).
2025-10-09 10:54:50.893 Connection "CID-56301" has been terminated.
2025-10-09 10:54:50.893 The connection with the client (IP address 172.17.0.1, Port number 49326) has been disconnected.
2025-10-09 10:55:00.896 On the TCP Listener (Port 443), a Client (IP address 172.17.0.1, Host name "UBUNTU", Port number 52432) has connected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions