sysadmin@ubuntu20:/opt$ sudo /opt/wireguard.sh -s
[Thu 13 Jan 2022 06:28:51 AM UTC] Check OS version
[Thu 13 Jan 2022 06:28:51 AM UTC] Install dependencies for wireguard
[Thu 13 Jan 2022 06:28:51 AM UTC] apt-get update
[Thu 13 Jan 2022 06:28:53 AM UTC] apt-get -y install qrencode
[Thu 13 Jan 2022 06:28:58 AM UTC] apt-get -y install iptables
[Thu 13 Jan 2022 06:28:59 AM UTC] apt-get -y install bc
[Thu 13 Jan 2022 06:28:59 AM UTC] apt-get -y install gcc
[Thu 13 Jan 2022 06:29:31 AM UTC] apt-get -y install make
[Thu 13 Jan 2022 06:29:36 AM UTC] apt-get -y install libmnl-dev
[Thu 13 Jan 2022 06:29:39 AM UTC] apt-get -y install libelf-dev
[Thu 13 Jan 2022 06:29:43 AM UTC] Install wireguard from source
[Thu 13 Jan 2022 06:29:44 AM UTC] wget --no-check-certificate -qO wireguard-linux-compat-1.0.20211208.tar.gz https://github.com/WireGuard/wireguard-linux-compat/archive/v1.0.20211208.tar.gz
[Thu 13 Jan 2022 06:33:17 AM UTC] tar zxf wireguard-linux-compat-1.0.20211208.tar.gz
[Thu 13 Jan 2022 06:33:17 AM UTC] cd wireguard-linux-compat-1.0.20211208/src
[Thu 13 Jan 2022 06:33:17 AM UTC] make
[Thu 13 Jan 2022 06:33:32 AM UTC] make install
At main.c:160:
- SSL error:02001002:system library:fopen:No such file or directory: ../crypto/bio/bss_file.c:69
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: ../crypto/bio/bss_file.c:76
sign-file: certs/signing_key.pem: No such file or directory
Warning: modules_install: missing 'System.map' file. Skipping depmod.
[Thu 13 Jan 2022 06:33:39 AM UTC] cd /opt && rm -fr wireguard-linux-compat-1.0.20211208.tar.gz wireguard-linux-compat-1.0.20211208
[Thu 13 Jan 2022 06:33:40 AM UTC] wget --no-check-certificate -qO wireguard-tools-1.0.20210914.tar.gz https://github.com/WireGuard/wireguard-tools/archive/v1.0.20210914.tar.gz
[Thu 13 Jan 2022 06:33:42 AM UTC] tar zxf wireguard-tools-1.0.20210914.tar.gz
[Thu 13 Jan 2022 06:33:42 AM UTC] cd wireguard-tools-1.0.20210914/src
[Thu 13 Jan 2022 06:33:42 AM UTC] make
[Thu 13 Jan 2022 06:33:45 AM UTC] make install
[Thu 13 Jan 2022 06:33:45 AM UTC] cd /opt && rm -fr wireguard-tools-1.0.20210914.tar.gz wireguard-tools-1.0.20210914
[Thu 13 Jan 2022 06:33:45 AM UTC] Create server interface: /etc/wireguard/wg0.conf
[Thu 13 Jan 2022 06:33:45 AM UTC] Create client interface: /etc/wireguard/wg0_client
[Thu 13 Jan 2022 06:33:45 AM UTC] Generate a QR Code picture with client interface
[Thu 13 Jan 2022 06:33:45 AM UTC] qrencode -s8 -o /etc/wireguard/wg0_client.png < /etc/wireguard/wg0_client
[Thu 13 Jan 2022 06:33:45 AM UTC] Enable IP forward
[Thu 13 Jan 2022 06:33:45 AM UTC] Setting firewall rules
[Thu 13 Jan 2022 06:33:45 AM UTC] Starting WireGuard via wg-quick for wg0
[Thu 13 Jan 2022 06:33:45 AM UTC] systemctl daemon-reload
[Thu 13 Jan 2022 06:33:45 AM UTC] systemctl start wg-quick@wg0
[Thu 13 Jan 2022 06:33:46 AM UTC] systemctl enable wg-quick@wg0
Created symlink /etc/systemd/system/multi-user.target.wants/wg-quick@wg0.service → /lib/systemd/system/wg-quick@.service.
[Thu 13 Jan 2022 06:33:46 AM UTC] WireGuard VPN Server installation completed
[Thu 13 Jan 2022 06:33:46 AM UTC]
[Thu 13 Jan 2022 06:33:46 AM UTC] WireGuard VPN default client file is below:
[Thu 13 Jan 2022 06:33:46 AM UTC] /etc/wireguard/wg0_client
[Thu 13 Jan 2022 06:33:46 AM UTC]
[Thu 13 Jan 2022 06:33:46 AM UTC] WireGuard VPN default client QR Code is below:
[Thu 13 Jan 2022 06:33:46 AM UTC] /etc/wireguard/wg0_client.png
[Thu 13 Jan 2022 06:33:46 AM UTC]
[Thu 13 Jan 2022 06:33:46 AM UTC] Download and scan this QR Code with your device
[Thu 13 Jan 2022 06:33:46 AM UTC] Welcome to visit: https://teddysun.com/554.html
[Thu 13 Jan 2022 06:33:46 AM UTC] Enjoy it
网友评论