Welcome!
Vintage Web 2.0 aesthetics,
snippets of code,
thoughts, photography,
and a bit of charm. History of the site
Snippets
Sometimes even useful code. Go to category
Electronics
micro, radio,
and usual. Go to category
Photo
From different categories. View category
7/August/2026 wireguardcentosdebianubuntufreebsd
Below is a set of snippets for configuring WireGuard for three different Linux distributions and FreeBSD.
The setup assumes a Debian server with a 10.9.21.0/24 network.
apt install wireguard-tools
nano /etc/network/interfaces.d/wg0
umask 077
cd /etc/wireguard/
wg genkey > server-private.key
wg pubkey < server-private.key > server-public.key
nano /etc/wireguard/wg0.conf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | |
27/January/2023 openvpnkernelwireguard
There are a lot of articles on the Internet about improving OpenVPN speed, and often they are all focused on the settings of the server-client itself, packet sizes, encryption algorithms or disabling them. Everyone compares OpenVPN to a WireGuard. WireGuard works in kernel space and that’s what determines everything. Compared to userspace for openvpn. But that’s not quite true.
Here I must immediately clarify, that the given method of solving the problem is specific for virtual machines with small memory size, from 1Gb to 8Gb, in other cases you need to compare memory, link bandwidth and speed.
Here is a list of dynamically set values relative to the system memory size:
sysctl net.core.rmem_defaultsysctl net.core.rmem_maxsysctl net.core.wmem_defaultsysctl net.core.wmem_maxsysctl net.core.somaxconnsysctl net.core.netdev_max_backlogsysctl net.core.optmem_maxsysctl net.ipv4.udp_memsysctl net.ipv4.udp_rmem_minsysctl net.ipv4.udp_wmem_minsysctl net.ipv4.tcp_memsysctl net.ipv4.tcp_rmemsysctl net.ipv4.tcp_wmemsysctl net.ipv4.tcp_synack_retriessysctl net.ipv4.tcp_keepalive_timesysctl net.ipv4.tcp_max_tw_buckets20/December/2019 kvmlvmpartedvirsh
1 2 3 4 5 6 7 8 9 10 | |
5/December/2019 nginxmime-typeswoff
To display Content-Type correctly, you need to add the following values to mime.types
otherwise the default_type application/octet-stream; directive will be used.