openvpn tcp protocol over frp forwarding issues
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 14.6k
- Forks
- 3.4k
- PR merge metrics
- No merged PRs in 30d
Description
My problem is that openvpn log shows frequently "connection reseting", "client restarting"
as follows:
Jun 11 12:29:42 k8s-pre-node01 openvpn: TCP connection established with [AF_INET]172.31.1.46:50990
Jun 11 12:29:42 k8s-pre-node01 openvpn: 172.31.1.46:50990 Connection reset, restarting [0]
Jun 11 12:29:42 k8s-pre-node01 openvpn: 172.31.1.46:50990 SIGUSR1[soft,connection-reset] received, client-instance restarting
Jun 11 12:29:42 k8s-pre-node01 openvpn: TCP connection established with [AF_INET]172.31.1.46:50992
Jun 11 12:29:42 k8s-pre-node01 openvpn: 172.31.1.46:50992 Connection reset, restarting [0]
Jun 11 12:29:42 k8s-pre-node01 openvpn: 172.31.1.46:50992 SIGUSR1[soft,connection-reset] received, client-instance restarting
Jun 11 12:29:42 k8s-pre-node01 openvpn: TCP connection established with [AF_INET]172.31.1.46:50994
Jun 11 12:29:42 k8s-pre-node01 openvpn: 172.31.1.46:50994 Connection reset, restarting [0]
Jun 11 12:29:42 k8s-pre-node01 openvpn: 172.31.1.46:50994 SIGUSR1[soft,connection-reset] received, client-instance restarting
Jun 11 12:29:42 k8s-pre-node01 openvpn: TCP connection established with [AF_INET]172.31.1.46:50996
Jun 11 12:29:42 k8s-pre-node01 openvpn: 172.31.1.46:50996 Connection reset, restarting [0]
Jun 11 12:29:42 k8s-pre-node01 openvpn: 172.31.1.46:50996 SIGUSR1[soft,connection-reset] received, client-instance restarting
Jun 11 12:29:42 k8s-pre-node01 openvpn: TCP connection established with [AF_INET]172.31.1.46:50998
Jun 11 12:29:42 k8s-pre-node01 openvpn: 172.31.1.46:50998 Connection reset, restarting [0]
Jun 11 12:29:42 k8s-pre-node01 openvpn: 172.31.1.46:50998 SIGUSR1[soft,connection-reset] received, client-instance restarting
here is my openvpn configuration:
local 192.168.7.4
port 1941
proto tcp
dev tun
ca /etc/openvpn/3.0.7/pki/ca.crt
cert /etc/openvpn/3.0.7/pki/issued/server.crt
key /etc/openvpn/3.0.7/pki/private/server.key
dh /etc/openvpn/3.0.7/pki/dh.pem
server 192.168.41.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "route 172.30.1.0 255.255.255.0"
keepalive 10 120
tls-auth /etc/openvpn/3.0.7/pki/ta.key 0
cipher AES-256-CBC
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3
reneg-sec 0
here is my frp configuration:
serverAddr = "123.8.141.2"
serverPort = 25056
auth.method = "token"
auth.token = "xxxxxxxxxxxxxxxxxxxxxxxxxx"
transport.tls.enable = true
transport.tls.certFile = "/usr/local/tls-frp/client.crt"
transport.tls.keyFile = "/usr/local/tls-frp/client.key"
transport.tls.trustedCaFile = "/usr/local/tls-frp/ca.crt"
[[proxies]]
name = "tfdx"
type = "tcp"
localIP = "192.168.7.4"
localPort = 1941
remotePort = 25058
Actually, when i change openvpn tcp to udp, this problem disappears. I don't know why openvpn tcp over frp does not work.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported OpenVPN and FRP configurations and the repeated TCP reset log sequence, then compare the TCP forwarding path with the UDP configuration that works. Reproduce the failure and determine whether the reset occurs at OpenVPN or during FRP forwarding; done means identifying a confirmed cause or required configuration change for stable TCP connections.
Written by the indexing model from the issue text.
Assessment
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100