[PR #3744] [MERGED] Alpine-Wireguard: Fix for sysctl and ip_forward #4505

Closed
opened 2026-02-26 14:31:11 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE/pull/3744
Author: @juronja
Created: 4/8/2025
Status: Merged
Merged: 4/8/2025
Merged by: @MickLesk

Base: mainHead: alpine-wireguard-ipforward-fix


📝 Commits (3)

  • 8622340 moved ip forwarding to wireguard install and removed silent before echo command, testing if this was a bug
  • d9105ea Adding $STD before echo command
  • 3e787bc Update install/alpine-wireguard-install.sh

📊 Changes

1 file changed (+35 additions, -34 deletions)

View changed files

📝 install/alpine-wireguard-install.sh (+35 -34)

📄 Description

✍️ Description

Peers had no internet connection when installing without verbose. net.ipv4.ip_forward = 1 was not set. Removed the silent function before echo fixed it.

Link: #

Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No breaking changes – Existing functionality remains intact.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

🔍 Code & Security Review (X in brackets)

  • Follows Code_Audit.md & CONTRIBUTING.md guidelines

📋 Additional Information (optional)

Peers did not have internet connection (handshake was ok) in alpine-wireguard LXC when installed with verbose OFF. silent function probbably was not working with this line.

"$STD echo "net.ipv4.ip_forward=1" >>/etc/sysctl.conf"

So the config was mising in LXC. I removed it to test and now it works.

  • I also moved related code to wg install, since you need this also if you dont install wgdash.
  • I also added rc-update add sysctl for reboot persistance. recommended here

Bug only happened on running the script with NO verbose.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/community-scripts/ProxmoxVE/pull/3744 **Author:** [@juronja](https://github.com/juronja) **Created:** 4/8/2025 **Status:** ✅ Merged **Merged:** 4/8/2025 **Merged by:** [@MickLesk](https://github.com/MickLesk) **Base:** `main` ← **Head:** `alpine-wireguard-ipforward-fix` --- ### 📝 Commits (3) - [`8622340`](https://github.com/community-scripts/ProxmoxVE/commit/862234055345ae5f1af701d93bab6f57b619ea67) moved ip forwarding to wireguard install and removed silent before echo command, testing if this was a bug - [`d9105ea`](https://github.com/community-scripts/ProxmoxVE/commit/d9105eadcf3c314bfc568861df9bc6de46974583) Adding $STD before echo command - [`3e787bc`](https://github.com/community-scripts/ProxmoxVE/commit/3e787bc214882ef37e7a62fc0785472fd9cf86ab) Update install/alpine-wireguard-install.sh ### 📊 Changes **1 file changed** (+35 additions, -34 deletions) <details> <summary>View changed files</summary> 📝 `install/alpine-wireguard-install.sh` (+35 -34) </details> ### 📄 Description <!--🛑 New scripts must first be submitted to [ProxmoxVED](https://github.com/community-scripts/ProxmoxVED) for testing. PRs for new scripts that skip this process will be closed. --> ## ✍️ Description <!-- Briefly describe your changes. --> Peers had no internet connection when installing without verbose. net.ipv4.ip_forward = 1 was not set. Removed the silent function before echo fixed it. ## 🔗 Related PR / Issue Link: # ## ✅ Prerequisites (**X** in brackets) - [X] **Self-review completed** – Code follows project standards. - [X] **Tested thoroughly** – Changes work as expected. - [X] **No breaking changes** – Existing functionality remains intact. - [X] **No security risks** – No hardcoded secrets, unnecessary privilege escalations, or permission issues. --- ## 🛠️ Type of Change (**X** in brackets) - [X] 🐞 **Bug fix** – Resolves an issue without breaking functionality. - [ ] ✨ **New feature** – Adds new, non-breaking functionality. - [ ] 💥 **Breaking change** – Alters existing functionality in a way that may require updates. - [ ] 🆕 **New script** – A fully functional and tested script or script set. - [ ] 🌍 **Website update** – Changes to website-related JSON files or metadata. - [ ] 🔧 **Refactoring / Code Cleanup** – Improves readability or maintainability without changing functionality. - [ ] 📝 **Documentation update** – Changes to `README`, `AppName.md`, `CONTRIBUTING.md`, or other docs. --- ## 🔍 Code & Security Review (**X** in brackets) - [X] **Follows `Code_Audit.md` & `CONTRIBUTING.md` guidelines** ## 📋 Additional Information (optional) <!-- Add any extra context, screenshots, or references. --> Peers did not have internet connection (handshake was ok) in alpine-wireguard LXC when installed with verbose OFF. silent function probbably was not working with this line. "$STD echo "net.ipv4.ip_forward=1" >>/etc/sysctl.conf" So the config was mising in LXC. I removed it to test and now it works. - I also moved related code to wg install, since you need this also if you dont install wgdash. - I also added rc-update add sysctl for reboot persistance. recommended [here](https://wiki.alpinelinux.org/wiki/Configure_a_Wireguard_interface_(wg)) Bug only happened on running the script with NO verbose. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 14:31:11 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ProxmoxVE#4505
No description provided.