angristan / wireguard-install

WireGuard VPN installer for Linux servers
https://stanislas.blog/2019/01/how-to-setup-vpn-server-wireguard-nat-ipv6/
MIT License
7.48k stars 1.26k forks source link

Error Happens in Oracle Linux 9 #498

Closed odboy closed 3 months ago

odboy commented 3 months ago
# cat /etc/os-release
NAME="Oracle Linux Server"
VERSION="9.3"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="9.3"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Oracle Linux Server 9.3"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:9:3:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://github.com/oracle/oracle-linux"

ORACLE_BUGZILLA_PRODUCT="Oracle Linux 9"
ORACLE_BUGZILLA_PRODUCT_VERSION=9.3
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=9.3

# ./wireguard-install.sh
Welcome to the WireGuard installer!
The git repository is available at: https://github.com/angristan/wireguard-install

I need to ask you a few questions before starting the setup.
You can keep the default options and just press enter if you are ok with them.

IPv4 or IPv6 public address: 10.123.45.141
Public interface: ens3
WireGuard interface name: wg0
Server WireGuard IPv4: 10.66.66.1
Server WireGuard IPv6: fd42:42:42::1
Server WireGuard port [1-65535]: 54004
First DNS resolver to use for the clients: 8.8.8.8
Second DNS resolver to use for the clients (optional): 1.1.1.1

WireGuard uses a parameter called AllowedIPs to determine what is routed over the VPN.
Allowed IPs list for generated clients (leave default to route everything): 0.0.0.0/0,::/0

Okay, that was all I needed. We are ready to setup your WireGuard server now.
You will be able to generate a client at the end of the installation.
Press any key to continue...

./wireguard-install.sh: line 169:  4784 Killed                  dnf install -y oraclelinux-developer-release-el8
Error: No matching repo to modify: ol8_developer.
Error: No matching repo to modify: ol8_developer_UEKR6.
Error: No matching repo to modify: ol8_developer_UEKR6.
./wireguard-install.sh: line 169:  4985 Killed                  dnf install -y wireguard-tools qrencode iptables
./wireguard-install.sh: line 214: wg: command not found
./wireguard-install.sh: line 215: wg: command not found
1412
* Applying /usr/lib/sysctl.d/01-unprivileged-bpf.conf ...
* Applying /usr/lib/sysctl.d/10-default-yama-scope.conf ...
* Applying /usr/lib/sysctl.d/50-coredump.conf ...
* Applying /usr/lib/sysctl.d/50-default.conf ...
* Applying /usr/lib/sysctl.d/50-ipv6.conf ...
* Applying /usr/lib/sysctl.d/50-libkcapi-optmem_max.conf ...
* Applying /usr/lib/sysctl.d/50-pid-max.conf ...
* Applying /usr/lib/sysctl.d/50-redhat.conf ...
* Applying /usr/lib/sysctl.d/50-scsi-logging.conf ...
* Applying /etc/sysctl.d/99-sysctl.conf ...
* Applying /etc/sysctl.d/wg.conf ...
* Applying /etc/sysctl.conf ...
kernel.unprivileged_bpf_disabled = 1
kernel.yama.ptrace_scope = 0
kernel.core_pattern = |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h
kernel.core_pipe_limit = 16
fs.suid_dumpable = 2
kernel.sysrq = 16
kernel.core_uses_pid = 1
net.ipv4.conf.default.rp_filter = 2
net.ipv4.conf.ens3.rp_filter = 2
net.ipv4.conf.lo.rp_filter = 2
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.ens3.accept_source_route = 0
net.ipv4.conf.lo.accept_source_route = 0
net.ipv4.conf.default.promote_secondaries = 1
net.ipv4.conf.ens3.promote_secondaries = 1
net.ipv4.conf.lo.promote_secondaries = 1
net.ipv4.ping_group_range = 0 2147483647
net.core.default_qdisc = fq_codel
fs.protected_hardlinks = 1
fs.protected_symlinks = 1
fs.protected_regular = 1
fs.protected_fifos = 1
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.all.disable_ipv6 = 0
net.core.optmem_max = 81920
kernel.pid_max = 4194304
kernel.kptr_restrict = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.ens3.rp_filter = 1
net.ipv4.conf.lo.rp_filter = 1
dev.scsi.logging_level = 68
kernel.unknown_nmi_panic = 1
net.ipv4.ip_forward = 1
net.ipv6.conf.all.forwarding = 1
kernel.unknown_nmi_panic = 1
Failed to start wg-quick@wg0.service: Unit wg-quick@wg0.service not found.
Failed to enable unit: Unit file wg-quick@wg0.service does not exist.
angristan commented 3 months ago
./wireguard-install.sh: line 169:  4784 Killed                  dnf install -y oraclelinux-developer-release-el8

Unfortunately, this is a common issue of dnf getting killed on low-memory devices (try dmesg -T). Try a bigger machine or adding swap.