WireGuard CentOS7

 

 

System:
CentOS Linux release 7.9.2009 (Core)

Installation WireGuard CentOS 7

yum install epel-release elrepo-release
yum install yum-plugin-elrepo
yum install kmod-wireguard wireguard-tools
modprobe wireguard

lsmod | grep wireguard
wireguard 200960 0
ip6_udp_tunnel 12755 1 wireguard
udp_tunnel 14423 1 wireguard
cd /etc/wireguard
wg genkey | tee server_private_key | wg pubkey > server_public_key
wg genkey | tee client_private_key | wg pubkey > client_public_key
chmod 600 ./*_private_key
vi /etc/wireguard/wg0.conf
[Interface]
Address = 10.8.0.1/24
PrivateKey = server_private_key
ListenPort = 35053

[Peer]
PublicKey = client_public_key
AllowedIPs = 10.8.0.2/32
vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
sysctl -p
firewall-cmd --permanent --zone=public --add-port=35053/udp
firewall-cmd --permanent --zone=public --add-masquerade
firewall-cmd --reload
systemctl enable wg-quick@wg0.service
systemctl restart wg-quick@wg0.service

Download WireGuard Windows installer

[Interface]
Address = 10.8.0.2/24
PrivateKey = client_private_key
DNS = 1.1.1.1

[Peer]
PublicKey = server_public_key
AllowedIPs = 0.0.0.0/0
Endpoint = IP:35053
PersistentKeepalive = 20

https://ifconfig.me/
https://fast.com/

Links: https://sysadmin.pm/wireguard