OpenVpn is slow on my VPS. I need some advice.

Started by Edelweiss, Oct 03, 2022, 04:56 AM

Previous topic - Next topic

EdelweissTopic starter

For my loved ones (3 people) deployed OpenVpn on their VPS in Digital Ocean. VPS is not loaded at all, there is a business card site with a couple dozens of visitors a day.

VPN needed for insta and twitter, etc.. Nothing through him do not download. So, - is extremely unstable work, especially in the evenings. I have to reconnect 100 times.

I have already set the buffers to zero, and disabled the encryption, not much helps. What else can I do?

Here is my config:

port 1194
proto udp
dev tun
user nobody
group nogroup
persist-key
persist-tun
keepalive 10 120
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS ********.14"
push "dhcp-option DNS ********.15"
push "redirect-gateway def1 bypass-dhcp"
dh none
ecdh-curve prime256v1
tls-crypt tls-crypt.key
crl-verify crl.pem
ca ca.crt
cert server_********.crt
key server_********.key
auth none
#cipher AES-128-GCM
#ncp-ciphers AES-128-GCM
cipher none
tls-server
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
client-config-dir /etc/openvpn/ccd
status /var/log/openvpn/status.log
verb 3
#possible bandwidth increase
sndbuf 0
rcvbuf 0
push "sndbuf 524288"
push "rcvbuf 524288"
EdelWeiss
  •  

-DM-

Try
proto tcp
You need to do it on both the client and the server.
In addition, and for UDP, including.  From the client to the server, run a trace. On a client run
traceroute -n -U -p 55775 <IP address of server>
If it does not work, from the server show output
iptables -Ln
P.S. The OS is not specified, so an additional "control shot": is selinux used? :)
  •  

EdelweissTopic starter

Quote from: -DM- on Oct 03, 2022, 05:34 AMproto tcp
You need to do it on both the client and the server.
After changing the protocol and restarting the VPN

/etc/init.d/openvpn restart
VPN stopped working at all. Rolled it back ((
Chose and on the phone TCP, - still no connection (VPN restarted).

Quote from: -DM- on Oct 03, 2022, 05:34 AMis selinux used? :)
Yes.
EdelWeiss
  •  

Bronson

Quote from: Edelweiss on Oct 03, 2022, 04:56 AMWhat else can I do?
Wireguard then.
https://www.wireguard.com
Fast and modern VPN, uses the most modern cryptography. Strives to be faster, simpler, more compact and useful than IPsec, without too much headache.
Empirically, it is more productive than OpenVPN.
  •  

Term

#4
Quote from: Edelweiss on Oct 03, 2022, 04:56 AMWhat else can I do?
Do not torture yourself and your loved ones. There are Inferno Solutions with out-of-the-box solutions for this purpose.
The asking price is $5 a month. Nothing lags, works fast. There are 10 profiles available.



Post Merge: Oct 03, 2022, 10:42 AM


Well, in this case: maybe you have something that creates a bunch of open sockets, which do not nail and clog the channel.
The channel to the server is sufficient?
  •  

EdelweissTopic starter

I have 200 megabits, I think it's enough.
Quote from: Term on Oct 03, 2022, 09:30 AMWell, in this case: maybe you have something that creates a bunch of open sockets, which do not nail and clog the channel.
The channel to the server is sufficient?
And how do I check it? I looked through htop and saw that the process is eating no more than 3% of CPU and no more than 1% of memory. I have no lags at all in the morning. They are usually closer to the evening.

Quote from: Bronson on Oct 03, 2022, 07:23 AMWireguard then.
Thank you, that description sounds interesting.
I will definitely try Wireguard, but first I will solve this question.
EdelWeiss
  •  

Ronny

Quote from: Edelweiss on Oct 03, 2022, 04:56 AMWhat else can I do?

I have a similar thing on openvpn - when both phone and computer are connected to the same vpn at the same time.
Starts slowing down and constantly reconnecting.
Looks like a conflict: can not work simultaneously from different devices...
Also I got terrible lags and freezes on win7.

The solution: I prescribed openvpn in the router. On the phone in the app for the router - you can quickly disable or change the server.
It works perfectly.
 :D
  •  

-DM-

You wrote that you are not the only user, right?
Maybe some device also has the VPN enabled at that moment, that's why there are all sorts of frustrations?
  •  

EdelweissTopic starter

Quote from: -DM- on Oct 03, 2022, 12:02 PMMaybe some device also has the VPN enabled at that moment, that's why there are all sorts of frustrations?
Thanks for the good point, that sounds about right.
Wife on ipad often does not turn off the VPN and probably often get a connection from different devices.
I'll see what I can do.
EdelWeiss
  •  

-DM-

Quote from: Edelweiss on Oct 03, 2022, 01:08 PMI'll see what I can do.
What is there to think about? ;) Thinking too much can give you a headache. :)
You have to do it. Issue a separate certificate for each person, and you will be happy and have peace at home. :) :) :)
  •