[PR #550] [CLOSED] Custom IP Range #127

Closed
opened 2026-11-11 16:39:56 +01:00 by Alvin-Zilverstand · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/angristan/openvpn-install/pull/550
Author: @browningluke
Created: 2/28/2020
Status: ❌ Closed

Base: master ← Head: master


📝 Commits (8)

📊 Changes

2 files changed (+38 additions, -19 deletions)

View changed files

📝 README.md (+1 -0)
📝 openvpn-install.sh (+37 -19)

📄 Description

I wanted to get the server OpenVPN to run on an IP range that was not 10.8.0.0. I added the ability for the user to specify which range the server shall assign IP addresses. This does not, however, implement custom subnets, it uses the default /24.

My changes are below. You can find these at line 246 in the file openvpn-install.sh. I followed a similar variable name as the others. This variable is then used in place of 10.8.0.0 and 10.8.0.1.

echo "What IP range settings do you want OpenVPN to use?"
echo "   1) Default: 10.8.0.0"
echo "   2) Custom"
until [[ "$IP_CHOICE" =~ ^[1-2]$ ]]; do
	read -rp "IP choice [1-2]: " -e -i 1 IP_CHOICE
done
case $IP_CHOICE in
	1)
		IP_RANGE="10.8.0.0"
	;;
	2)
		until [[ "$IP_RANGE" =~ ^([0-9]{1,3}\.){3}0$ ]]; do
			read -rp "Custom IP [x.x.x.0]: " -e -i 10.8.0.0 IP_RANGE
		done
	;;
esac

🔄 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/angristan/openvpn-install/pull/550 **Author:** [@browningluke](https://github.com/browningluke) **Created:** 2/28/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (8) - [`7841a18`](https://github.com/angristan/openvpn-install/commit/7841a1801d5622a7d310d0f4d71901a9d976eb35) Add custom IP range - [`d7cbcf7`](https://github.com/angristan/openvpn-install/commit/d7cbcf7ec1a58ec77125e937c84d2dd0491211fc) Update README.md - [`239b5be`](https://github.com/angristan/openvpn-install/commit/239b5be082d24e9d6a8793b5a21e68b54e6501c9) Fix IP_RANGE variable substitution - [`8d57810`](https://github.com/angristan/openvpn-install/commit/8d57810fb98e2a4adceedffa447a1e7f62794261) Escape IP_RANGE variable - [`030c2e5`](https://github.com/angristan/openvpn-install/commit/030c2e587c645ecb2711558f785e60df881950f6) Fix IP Regex - [`073589e`](https://github.com/angristan/openvpn-install/commit/073589e5fad2ebfa9a9c85d50298e8b0cff42a22) Merge remote-tracking branch 'upstream/master' - [`7846245`](https://github.com/angristan/openvpn-install/commit/784624585fe93de7602a0d1233f92f3050650089) Merge Updates - [`3e3c874`](https://github.com/angristan/openvpn-install/commit/3e3c874b4929c3bb97d5aaf16f14487551ba9c9b) Merge pull request #1 from rhyswilliamsza/master ### 📊 Changes **2 files changed** (+38 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -0) 📝 `openvpn-install.sh` (+37 -19) </details> ### 📄 Description I wanted to get the server OpenVPN to run on an IP range that was not `10.8.0.0`. I added the ability for the user to specify which range the server shall assign IP addresses. This does not, however, implement custom subnets, it uses the default /24. My changes are below. You can find these at line 246 in the file `openvpn-install.sh`. I followed a similar variable name as the others. This variable is then used in place of `10.8.0.0` and `10.8.0.1`. ```bash echo "What IP range settings do you want OpenVPN to use?" echo " 1) Default: 10.8.0.0" echo " 2) Custom" until [[ "$IP_CHOICE" =~ ^[1-2]$ ]]; do read -rp "IP choice [1-2]: " -e -i 1 IP_CHOICE done case $IP_CHOICE in 1) IP_RANGE="10.8.0.0" ;; 2) until [[ "$IP_RANGE" =~ ^([0-9]{1,3}\.){3}0$ ]]; do read -rp "Custom IP [x.x.x.0]: " -e -i 10.8.0.0 IP_RANGE done ;; esac ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Alvin-Zilverstand added the pull-request label 2026-11-11 16:39:56 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/openvpn-install#127