kylemanna / docker-openvpn

🔒 OpenVPN server in a Docker container complete with an EasyRSA PKI CA
https://hub.docker.com/r/kylemanna/openvpn/
MIT License
8.62k stars 2.37k forks source link

Changing cipher strengths? #671

Open icsy7867 opened 2 years ago

icsy7867 commented 2 years ago

I have recently purchases a VPS (Dual core, 2GB ram) and I am running docker and testing some speeds.

I have a very similar setup in an OpenVZ instance on another host and I am getting better speeds, and I am trying to do some testing to see where the slowdowns are.

To begin, I wanted to lower the cipher and signing algorithms as a test.

docker run -v ovpn_data:/etc/openvpn --rm kylemanna/openvpn ovpn_genconfig -u udp://vpn.my.server -C 'AES-128-GCM' -a 'SHA1'

However after generating my configs, initializing PKI, running the container and generating the configs (Which list AES-128-GCM correctly) I start my container and check the logs.

Mon Aug 23 17:40:32 2021 client1/19.15.15.96:18731 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Mon Aug 23 17:40:32 2021 client1/19.15.15.96:18731 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key

Was just curious if i was doing this incorrectly? But your docker container is great and one of the easiest VPN deployments I have ever done!

icsy7867 commented 2 years ago

I found another post but it mentioned using --ncp-ciphers in their docker-compose.

I did sole googling and found I can add this to the openvpn configs directly (not sure about the command line or with this container

ncp-ciphers AES-128-GCM

Also for the speed issues, I couldnt get more than 2-4 MB/s on my multiple providers. But my openVZ deployment on ramnod (exact same config) hit 7-9MB/s