WireGuardサーバを RockyLinux8 で作ってみる
[root@wireguard ~]# cat /etc/redhat-release
Rocky Linux release 8.8 (Green Obsidian)
[root@wireguard ~]# uname -r
4.18.0-477.10.1.el8_8.x86_64
[root@wireguard ~]# mokutil --sb-state
SecureBoot enabled
[root@wireguard ~]#
WireGuardのサーバになるには「wireguard-tools」とカーネルモジュールの「wireguard.ko」が必要.
RockyLinux9と違ってOS kernelがwireguard.koを持ってないので両方ともインストール作業が必要になります
まず「wireguard-tools」
[root@wireguard ~]# dnf install epel-release -y
[root@wireguard ~]# dnf install wireguard-tools -y
次に「wireguard.ko」
[root@wireguard ~]# curl -O http://ftp-srv2.kddi-research.jp/Linux/RPMS/elrepo/elrepo/el8/x86_64/RPMS/kmod-wireguard-1.0.20220627-5.el8_8.elrepo.x86_64.rpm
[root@wireguard ~]# dnf localinstall kmod-wireguard-1.0.20220627-5.el8_8.elrepo.x86_64.rpm -y
っが、このカーネルモジュールを取り込もうとすると
[root@wireguard ~]# modprobe wireguard
modprobe: ERROR: could not insert 'wireguard': Required key not available
[root@wireguard ~]#
とエラーになります. セキュアブートを無効にすれば行けます
[root@wireguard ~]# mokutil --sb-state
SecureBoot disabled
[root@wireguard ~]# modprobe wireguard
[root@wireguard ~]# lsmod | grep wireguard
wireguard 212992 0
ip6_udp_tunnel 16384 1 wireguard
udp_tunnel 20480 1 wireguard
[root@wireguard ~]#