Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation on Rocky Linux 9.1 is broken #390

Open
Rebelllious opened this issue Apr 17, 2023 · 5 comments
Open

Installation on Rocky Linux 9.1 is broken #390

Rebelllious opened this issue Apr 17, 2023 · 5 comments

Comments

@Rebelllious
Copy link
Contributor

Would you like to expire the peer after a certain period of time?
  1) Every Year (Recommended)
  2) No
Automatic config expire [1-2]:2
Last metadata expiration check: 0:03:58 ago on Mon 17 Apr 2023 11:11:54 PM CEST.
No match for argument: openresolv
**Error: Unable to find a match: openresolv**
Last metadata expiration check: 0:03:58 ago on Mon 17 Apr 2023 11:11:54 PM CEST.
Last metadata expiration check: 0:03:59 ago on Mon 17 Apr 2023 11:11:54 PM CEST.
No match for argument: kmod-wireguard
**Error: Unable to find a match: kmod-wireguard**
Last metadata expiration check: 0:03:59 ago on Mon 17 Apr 2023 11:11:54 PM CEST.
**No match for argument: unbound-host
No match for argument: unbound-anchor**
Error: Unable to find a match: unbound-host unbound-anchor
/usr/local/bin/wireguard-manager.sh: line 1144: unbound-anchor: command not found
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3311  100  3311    0     0   6912      0 --:--:-- --:--:-- --:--:--  6912
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6204    0  6204    0     0   5869      0 --:--:--  0:00:01 --:--:--  5869
/usr/local/bin/wireguard-manager.sh: line 1224: wg: command not found
/usr/local/bin/wireguard-manager.sh: line 1225: wg: command not found
/usr/local/bin/wireguard-manager.sh: line 1227: wg: command not found
/usr/local/bin/wireguard-manager.sh: line 1228: wg: command not found
/usr/local/bin/wireguard-manager.sh: line 1233: wg: command not found
Created symlink /etc/systemd/system/multi-user.target.wants/nftables.service → /usr/lib/systemd/system/nftables.service.
Failed to enable unit: Unit file wg-quick@wg0.service does not exist.
Failed to enable unit: Unit file unbound.service does not exist.
Failed to restart unbound.service: Unit unbound.service not found.
/usr/local/bin/wireguard-manager.sh: line 1307: qrencode: command not found
# https://www.wireguard.com
@Rebelllious
Copy link
Contributor Author

Notes:

  • in Rocky Linux 9, qrencode is available via EPEL, unlike in Rocky Linux 8.
  • unbound-anchor is installed as part of unbound-libs, which is a dependency for installing unbound. Thus, no separate command for unbound-anchor is required. unbound-host is also installed as part of unbound/unbound-libs installation.

Will test the adjusted code and push a commit later.

@Rebelllious
Copy link
Contributor Author

Required repositories:
yum install epel-release elrepo-release -y
Enabling wireguard in the kernel before installing wireguard-tools (no kmod-wireguard is required):
modprobe wireguard
PostUp and PostDown actions in /etc/wireguard/wg0.conf fail to execute IP forwarding commands with the below errors:

Apr 21 21:34:44 localhost.localdomain wg-quick[25946]: Warning: '/etc/wireguard/wg0.conf' is world accessible
Apr 21 21:34:44 localhost.localdomain wg-quick[25946]: [#] ip link add wg0 type wireguard
Apr 21 21:34:44 localhost.localdomain wg-quick[25946]: [#] wg setconf wg0 /dev/fd/63
Apr 21 21:34:44 localhost.localdomain wg-quick[25946]: [#] ip -4 address add 10.0.0.1/8 dev wg0
Apr 21 21:34:44 localhost.localdomain wg-quick[25946]: [#] ip -6 address add fd00:00:00::1/8 dev wg0
Apr 21 21:34:44 localhost.localdomain wg-quick[25946]: [#] ip link set mtu 1420 up dev wg0
Apr 21 21:34:44 localhost.localdomain wg-quick[25946]: [#] sysctl --write net.ipv4.ip_forward=1; sysctl --write net.ipv6.conf.all.forwarding=1; nft add table inet wiregua>
Apr 21 21:34:44 localhost.localdomain wg-quick[25975]: sysctl: cannot stat /proc/sys/net/ipv4/ip_forward: Permission denied
Apr 21 21:34:44 localhost.localdomain wg-quick[25946]: [#] ip link delete dev wg0
Apr 21 21:34:44 localhost.localdomain systemd[1]: wg-quick@wg0.service: Main process exited, code=exited, status=1/FAILURE

Not sure about the nature of this "permission denied" yet, haven't dug too deep into it so far. When running the same commands manually, it all worked. Removing them from the PostUp PostDown commands did the trick and the VPN server is fully functional.

@Rebelllious
Copy link
Contributor Author

Rebelllious commented Apr 21, 2023

@Prajwal-Koirala is there any specific reason why we issue the sysctl --write net.ipv4.ip_forward=1; sysctl --write net.ipv6.conf.all.forwarding=1 commands as part of bringing up the Wireguard interface as opposed to performing this just once when configuring the server?

@Rebelllious
Copy link
Contributor Author

Rebelllious commented Apr 23, 2023

@Prajwal-Koirala sorry, DJI is not something I am currently interested in. Also, I don't want to keep things half baked like in case with this script at the moment.

@Prajwal-Koirala
Copy link
Member

The GitHub issue #390 for the Wireguard Manager project, titled "Installation on Rocky Linux 9.1 is broken," was opened by the user Rebelllious on April 17, 2023. The issue describes several problems encountered during the installation process on Rocky Linux 9.1:

  1. Missing Packages: The script couldn't find openresolv, kmod-wireguard, unbound-host, and unbound-anchor packages【6†source】.

  2. Changes in Package Availability: For Rocky Linux 9, it's noted that qrencode is available via EPEL, unlike in Rocky Linux 8. It's also mentioned that unbound-anchor is part of unbound-libs, which is a dependency for installing unbound, so no separate command for unbound-anchor is needed【7†source】.

  3. Kernel Module for Wireguard: The user suggests enabling Wireguard in the kernel before installing wireguard-tools, negating the need for kmod-wireguard. They provided a command for this (modprobe wireguard)【8†source】.

  4. IP Forwarding Issues: During the PostUp and PostDown actions in /etc/wireguard/wg0.conf, there were errors executing IP forwarding commands, leading to 'Permission Denied' messages. The issue was temporarily resolved by removing these commands from the PostUp and PostDown sections, which made the VPN server functional【8†source】.

  5. Question about sysctl Commands: There's a query about why the sysctl --write net.ipv4.ip_forward=1; sysctl --write net.ipv6.conf.all.forwarding=1 commands are issued as part of bringing up the Wireguard interface, instead of performing them just once when configuring the server【9†source】.

  6. General Concerns about the Script's Completeness: The user expressed reluctance to keep the script in a 'half-baked' state, indicating a desire for more comprehensive solutions or fixes【10†source】.

These comments and questions highlight issues with package availability, configuration steps, and concerns about the script's overall robustness on Rocky Linux 9.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants