Skip to content

Instantly share code, notes, and snippets.

@bhyde
Created February 20, 2020 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bhyde/786eb259e84d5d04b50ee8649f632912 to your computer and use it in GitHub Desktop.
Save bhyde/786eb259e84d5d04b50ee8649f632912 to your computer and use it in GitHub Desktop.
Transcript of failed install of wireguard on centos 8
>->-> echo ==== Start $0 ====
==== Start /tmp/firstboot.exec ====
>->-> date
Thu Feb 20
14:41:29 UTC 2020
>->-> yum update -y
CentOS-8 - AppStream 15 kB/s | 4.3 kB 00:00
CentOS-8 - AppStream 17 MB/s | 6.4 MB 00:00
CentOS-8 - Base 14 kB/s | 3.8 kB 00:00
CentOS-8 - Base 12 MB/s | 5.0 MB 00:00
CentOS-8 - Extras 6.0 kB/s | 1.5 kB 00:00
Dependencies resolved.
================================================================================
Package ArchVersion Repo Size
================================================================================
Installing:
kernel x86_644.18.0-147.5.1.el8_1 BaseOS 1.5 M
kernel-core x86_644.18.0-147.5.1.el8_1 BaseOS 25 M
kernel-modules x86_644.18.0-147.5.1.el8_1 BaseOS 22 M
Upgrading:
buildah x86_641.11.6-4.module_el8.1.0+272+3e64ee36 AppStream 8.8 M
cockpit-podman noarch11-1.module_el8.1.0+272+3e64ee36 AppStream 1.0 M
container-selinux noarch2:2.124.0-1.module_el8.1.0+272+3e64ee36 AppStream 47 k
containernetworking-plugins x86_640.8.3-4.module_el8.1.0+272+3e64ee36 AppStream 20 M
containers-common x86_641:0.1.40-8.module_el8.1.0+275+1b647963 AppStream 49 k
fuse-overlayfs x86_640.7.2-1.module_el8.1.0+272+3e64ee36 AppStream 59 k
... etc ...
systemd-pam x86_64239-18.el8_1.2 BaseOS 230 k
systemd-udev x86_64239-18.el8_1.2 BaseOS 1.3 M
tuned noarch2.12.0-3.el8_1.1 BaseOS 275 k
Installing dependencies:
conmon x86_642:2.0.6-1.module_el8.1.0+272+3e64ee36 AppStream 37 k
grub2-tools-efi x86_641:2.02-78.el8_1.1 BaseOS 465 k
Transaction Summary
================================================================================
Install 5 Packages
Upgrade 40 Packages
Total download size: 129 M
Downloading Packages:
(1/45): conmon-2.0.6-1.module_el8.1.0+272+3e64e 1.0 MB/s | 37 kB 00:00
(2/45): grub2-tools-efi-2.02-78.el8_1.1.x86_64. 6.3 MB/s | 465 kB 00:00
(3/45): kernel-4.18.0-147.5.1.el8_1.x86_64.rpm 14 MB/s | 1.5 MB 00:00
... etc ...
(42/45): systemd-239-18.el8_1.2.x86_64.rpm 48 MB/s | 3.5 MB 00:00
(43/45): systemd-pam-239-18.el8_1.2.x86_64.rpm 10 MB/s | 230 kB 00:00
(44/45): tuned-2.12.0-3.el8_1.1.noarch.rpm 22 MB/s | 275 kB 00:00
(45/45): systemd-udev-239-18.el8_1.2.x86_64.rpm 44 MB/s | 1.3 MB 00:00
--------------------------------------------------------------------------------
Total 80 MB/s | 129 MB 00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: glibc-common-2.28-72.el8_1.1.x86_64 1/1
Upgrading : glibc-common-2.28-72.el8_1.1.x86_64 1/85
... etc ...
Running scriptlet: systemd-239-18.el8_1.2.x86_64 85/85
Running scriptlet: systemd-udev-239-18.el8_1.2.x86_64 85/85
Verifying : conmon-2:2.0.6-1.module_el8.1.0+272+3e64ee36.x86_6 1/85
Verifying : grub2-tools-efi-1:2.02-78.el8_1.1.x86_64 2/85
.... etc ...
Verifying : systemd-udev-239-18.el8_1.1.x86_64 83/85
Verifying : tuned-2.12.0-3.el8_1.1.noarch 84/85
Verifying : tuned-2.12.0-3.el8.noarch 85/85
Upgraded:
buildah-1.11.6-4.module_el8.1.0+272+3e64ee36.x86_64
cockpit-podman-11-1.module_el8.1.0+272+3e64ee36.noarch
container-selinux-2:2.124.0-1.module_el8.1.0+272+3e64ee36.noarch
... etc ...
systemd-udev-239-18.el8_1.2.x86_64
tuned-2.12.0-3.el8_1.1.noarch
Installed:
kernel-4.18.0-147.5.1.el8_1.x86_64
kernel-core-4.18.0-147.5.1.el8_1.x86_64
kernel-modules-4.18.0-147.5.1.el8_1.x86_64
conmon-2:2.0.6-1.module_el8.1.0+272+3e64ee36.x86_64
grub2-tools-efi-1:2.02-78.el8_1.1.x86_64
Complete!
>->-> yum install -y epel-release
Last metadata expiration check: 0:02:22 ago on Thu 20 Feb 2020 02:41:34 PM UTC.
Dependencies resolved.
================================================================================
Package Architecture Version Repository Size
================================================================================
Installing:
epel-release noarch 8-5.el8 extras 22 k
Transaction Summary
================================================================================
Install 1 Package
Total download size: 22 k
Installed size: 30 k
Downloading Packages:
epel-release-8-5.el8.noarch.rpm 522 kB/s | 22 kB 00:00
--------------------------------------------------------------------------------
Total 127 kB/s | 22 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : epel-release-8-5.el8.noarch 1/1
Running scriptlet: epel-release-8-5.el8.noarch 1/1
Verifying : epel-release-8-5.el8.noarch 1/1
Installed:
epel-release-8-5.el8.noarch
Complete!
>->-> yum config-manager --set-enabled PowerTools
>->-> yum copr enable -y jdoss/wireguard
Repository successfully enabled.
>->-> yum install -y wireguard-dkms wireguard-tools
CentOS-8 - AppStream 12 kB/s | 4.3 kB 00:00
CentOS-8 - Base 13 kB/s | 3.8 kB 00:00
CentOS-8 - Extras 5.6 kB/s | 1.5 kB 00:00
CentOS-8 - PowerTools 5.5 MB/s | 2.0 MB 00:00
Copr repo for wireguard owned by jdoss 1.1 kB/s | 4.9 kB 00:04
Extra Packages for Enterprise Linux 8 - x86_64 3.7 MB/s | 5.9 MB 00:01
Dependencies resolved.
================================================================================
Package ArchVersion Repository Size
================================================================================
Installing:
wireguard-dkms noarch1:0.0.20200215-2.el8 copr:copr.fedorainfracloud.org:jdoss:wireguard 318 k
wireguard-tools x86_641:1.0.20200102-1.el8 copr:copr.fedorainfracloud.org:jdoss:wireguard 121 k
Installing dependencies:
cpp x86_648.3.1-4.5.el8 AppStream 10 M
gcc x86_648.3.1-4.5.el8 AppStream 23 M
... etc ...
zlib-devel x86_641.2.11-10.el8 BaseOS 56 k
dkms noarch2.7.1-2.el8 epel 79 k
Transaction Summary
================================================================================
Install 32 Packages
Total download size: 62 M
Installed size: 169 M
Downloading Packages:
(1/32): isl-0.16.1-6.el8.x86_64.rpm 13 MB/s | 841 kB 00:00
(2/32): libmpc-1.0.2-9.el8.x86_64.rpm 17 MB/s | 59 kB 00:00
... etc ...
(30/32): dkms-2.7.1-2.el8.noarch.rpm 1.0 MB/s | 79 kB 00:00
(31/32): wireguard-tools-1.0.20200102-1.el8.x86 849 kB/s | 121 kB 00:00
(32/32): wireguard-dkms-0.0.20200215-2.el8.noar 1.7 MB/s | 318 kB 00:00
--------------------------------------------------------------------------------
Total 38 MB/s | 62 MB 00:01
warning: /var/cache/dnf/copr:copr.fedorainfracloud.org:jdoss:wireguard-6424b6887d769b3f/packages/wireguard-dkms-0.0.20200215-2.el8.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID fd626932: NOKEY
Copr repo for wireguard owned by jdoss 7.8 kB/s | 969 B 00:00
Importing GPG key 0xFD626932:
Userid : "jdoss_wireguard (None) <jdoss#wireguard@copr.fedorahosted.org>"
Fingerprint: 9CBC E731 A606 AFC3 E7CE 66F6 151C 9FF7 FD62 6932
From : https://download.copr.fedorainfracloud.org/results/jdoss/wireguard/pubkey.gpg
Key imported successfully
warning: /var/cache/dnf/epel-6519ee669354a484/packages/dkms-2.7.1-2.el8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 2f86d6a1: NOKEY
Extra Packages for Enterprise Linux 8 - x86_64 1.6 MB/s | 1.6 kB 00:00
Importing GPG key 0x2F86D6A1:
Userid : "Fedora EPEL (8) <epel@fedoraproject.org>"
Fingerprint: 94E2 79EB 8D8F 25B2 1810 ADF1 21EA 45AB 2F86 D6A1
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : perl-Exporter-5.72-396.el8.noarch 1/32
Installing : perl-libs-4:5.26.3-416.el8.x86_64 2/32
... etc ...
Verifying : wireguard-tools-1:1.0.20200102-1.el8.x86_64 31/32
Verifying : dkms-2.7.1-2.el8.noarch 32/32
Installed:
wireguard-dkms-1:0.0.20200215-2.el8.noarch
wireguard-tools-1:1.0.20200102-1.el8.x86_64
... etc ...
zlib-devel-1.2.11-10.el8.x86_64
dkms-2.7.1-2.el8.noarch
Complete!
>->-> mkdir -p /etc/wireguard
>->-> rm -rf /etc/wireguard/wg0.conf
>->-> touch /etc/wireguard/wg0.conf
>->-> chmod -R 660 /etc/wireguard
>->-> cat <<EOF > /etc/wireguard/wg0.conf
[Interface]
Address = 192.168.89.1/24
SaveConfig = true
PrivateKey = KO...etc...I=
ListenPort = 53
[Peer]
PublicKey = f/...etc..E=
AllowedIPs = 192.168.89.12/32
[Peer]
..etc..
..etc..
EOF
>->-> sysctl net.ipv4.ip_forward=1
>->-> net.ipv4.ip_forward = 1
>->-> echo 'sysctl net.ipv4.ip_forward=1' >> /etc/sysctl.d/99-sysctl.conf
>->-> cat <<EOF > /etc/firewalld/services/wireguard.xml
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>wireguard</short>
<description>WireGuard (wg) custom installation</description>
<port protocol="udp" port="53"/>
</service>
EOF
>->-> firewall-cmd --permanent --new-service-from-file=/etc/firewalld/services/wireguard.xml
success
>->-> firewall-cmd --reload
success
>->-> firewall-cmd --add-service=wireguard --permanent
success
>->-> firewall-cmd --add-masquerade --permanent
success
>->-> firewall-cmd --reload
success
>->-> firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: ens3
sources:
services: cockpit dhcpv6-client ssh wireguard
ports:
protocols:
masquerade: yes
forward-ports:
source-ports:
icmp-blocks:
rich rules:
>->-> systemctl status
● gusto
State: starting
Jobs: 4 queued
Failed: 0 units
Since: Thu 2020-02-20 14:41:18 UTC; 3min 27s ago
CGroup: /
├─init.scope
│ └─1 /usr/lib/systemd/systemd --system --deserialize 28
└─system.slice
├─rngd.service
│ └─651 /sbin/rngd -f
├─libstoragemgmt.service
│ └─647 /usr/bin/lsmd -d
... etc ...
├─smartd.service
│ └─648 /usr/sbin/smartd -n -q never
└─systemd-logind.service
└─674 /usr/lib/systemd/systemd-logind
>->-> systemctl enable wg-quick@wg0
Created symlink /etc/systemd/system/multi-user.target.wants/wg-quick@wg0.service → /usr/lib/systemd/system/wg-quick@.service.
systemctl start wg-quick@wg0 # actually starts later, when it's preconditions are met.
Job for wg-quick@wg0.service failed because the control process exited with error code.
See "systemctl status wg-quick@wg0.service" and "journalctl -xe" for details.
>->-> systemctl status wg-quick@wg0
● wg-quick@wg0.service - WireGuard via wg-quick(8) for wg0
Loaded: loaded (/usr/lib/systemd/system/wg-quick@.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2020-02-20 14:44:46 UTC; 22ms ago
Docs: man:wg-quick(8)
man:wg(8)
https://www.wireguard.com/
https://www.wireguard.com/quickstart/
https://git.zx2c4.com/wireguard-tools/about/src/man/wg-quick.8
https://git.zx2c4.com/wireguard-tools/about/src/man/wg.8
Process: 10477 ExecStart=/usr/bin/wg-quick up wg0 (code=exited, status=1/FAILURE)
Main PID: 10477 (code=exited, status=1/FAILURE)
Feb 20 14:44:46 gusto systemd[1]: Starting WireGuard via wg-quick(8) for wg0...
Feb 20 14:44:46 gusto wg-quick[10477]: [#] ip link add wg0 type wireguard
Feb 20 14:44:46 gusto wg-quick[10477]: RTNETLINK answers: Operation not supported
Feb 20 14:44:46 gusto wg-quick[10477]: Unable to access interface: Protocol not supported
Feb 20 14:44:46 gusto wg-quick[10477]: [#] ip link delete dev wg0
Feb 20 14:44:46 gusto wg-quick[10477]: Cannot find device "wg0"
Feb 20 14:44:46 gusto systemd[1]: wg-quick@wg0.service: Main process exited, code=exited, status=1/FAILURE
Feb 20 14:44:46 gusto systemd[1]: wg-quick@wg0.service: Failed with result 'exit-code'.
Feb 20 14:44:46 gusto systemd[1]: Failed to start WireGuard via wg-quick(8) for wg0.
>->-> wg show
>->-> date
Thu Feb 20 14:44:50 UTC 2020
>->-> echo ==== All done $0 ====
==== All done /tmp/firstboot.exec ====
@bhyde
Copy link
Author

bhyde commented Feb 20, 2020

 Brief overview of what that does...
  1:>->-> echo ==== Start $0 ====
  3:>->-> date
  6:>->-> yum update -y
 87:>->-> yum install -y epel-release
120:>->-> yum config-manager --set-enabled PowerTools
121:>->-> yum copr enable -y jdoss/wireguard
123:>->-> yum install -y wireguard-dkms wireguard-tools
194:>->-> mkdir -p /etc/wireguard
195:>->-> rm -rf /etc/wireguard/wg0.conf
196:>->-> touch /etc/wireguard/wg0.conf
197:>->-> chmod -R 660 /etc/wireguard
199:>->-> cat <<EOF > /etc/wireguard/wg0.conf
215:>->-> sysctl net.ipv4.ip_forward=1
216:>->-> net.ipv4.ip_forward = 1
217:>->-> echo 'sysctl net.ipv4.ip_forward=1' >> /etc/sysctl.d/99-sysctl.conf
218:>->-> cat <<EOF > /etc/firewalld/services/wireguard.xml
226:>->-> firewall-cmd --permanent --new-service-from-file=/etc/firewalld/services/wireguard.xml
228:>->-> firewall-cmd --reload
230:>->-> firewall-cmd --add-service=wireguard  --permanent
232:>->-> firewall-cmd --add-masquerade --permanent
234:>->-> firewall-cmd --reload
236:>->-> firewall-cmd --list-all
251:>->-> systemctl status
270:>->-> systemctl enable wg-quick@wg0
275:>->-> systemctl status wg-quick@wg0 
297:>->-> wg show
298:>->-> date
300:>->-> echo ==== All done $0 ====

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment