Answer the question
In order to leave comments, you need to log in
I changed the port for openvpn, and an error occurred, what's the matter?
I changed the openvpn port from 1194 to 80.
I changed connections with this from UDP to TCP and what's the error? (if left in UDP mode, it did not work at all).
Who knows how to treat?
Fri Jan 17 00:15:25 2020 WARNING: Bad encapsulated packet length from peer (18516), which must be > 0 and <= 1627 -- please ensure that --tun-mtu or --link-mtu is equal on both peers -- this condition could also indicate a possible active attack on the TCP link -- [Attempting restart...]
Fri Jan 17 00:15:25 2020 Connection reset, restarting [0]
Fri Jan 17 00:15:25 2020 SIGUSR1[soft,connection-reset] received, process restarting
port 80
proto tcp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh.pem
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist /var/log/openvpn/ipp.txt
## передача маршрутов клиентам (сети для примера)
## можно передавать всем все сразу, или выборочно в файлах ccd/clientX
push "route 192.168.0.0 255.255.255.0"
push "route 192.168.1.0 255.255.255.0"
push "route 10.15.17.0 255.255.255.0"
;push "redirect-gateway def1 bypass-dhcp"
;push "dhcp-option DNS 208.67.222.222"
;push "dhcp-option DNS 208.67.220.220"
client-config-dir ccd
## маршрутизация для сервера, если понадобится
route 192.168.0.0 255.255.255.0
route 192.168.1.0 255.255.255.0
route-gateway 10.8.0.1
client-to-client
keepalive 10 120
tls-auth ta.key 0
cipher AES-128-CBC
auth SHA1
comp-lzo
persist-key
persist-tun
status /var/log/openvpn/openvpn-status.log
log /var/log/openvpn/openvpn.log
log-append /var/log/openvpn/openvpn.log
verb 3
explicit-exit-notify 1
sndbuf 524288
rcvbuf 524288
push "sndbuf 524288"
push "rcvbuf 524288"
Answer the question
In order to leave comments, you need to log in
Does it work without it?
sndbuf 524288
rcvbuf 524288
push "sndbuf 524288"
push "rcvbuf 524288"
Perhaps this is due to different mtu values on the client and server.
Add the mtu-test option to the config on the server and client, then when connected, openvpn will test mtu and log information about the real mtu, it can be written in the tun-mtu option
https://community.openvpn.net/openvpn/wiki /Openvpn...
https://forums.openvpn.net/viewtopic.php?t=25039
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question