mirror of
				https://github.com/angristan/openvpn-install.git
				synced 2025-10-31 05:57:36 +01:00 
			
		
		
		
	Fix /dev/urandom usage on unprivileged LXC containers
Fixes https://github.com/angristan/openvpn-install/issues/280
This commit is contained in:
		| @@ -539,8 +539,8 @@ WantedBy=multi-user.target" > /etc/systemd/system/iptables.service | ||||
| 	rm -f ~/EasyRSA-3.0.4.tgz | ||||
| 	cd /etc/openvpn/easy-rsa/ || return | ||||
| 	# Generate a random, alphanumeric identifier of 16 characters for CN and one for server name | ||||
| 	SERVER_CN="cn_$(tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 16 | head -n 1)" | ||||
| 	SERVER_NAME="server_$(tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 16 | head -n 1)" | ||||
| 	SERVER_CN="cn_$(head /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1)" | ||||
| 	SERVER_NAME="server_$(head /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1)" | ||||
| 	echo "set_var EASYRSA_KEY_SIZE $RSA_KEY_SIZE" > vars | ||||
| 	echo "set_var EASYRSA_REQ_CN $SERVER_CN" >> vars | ||||
| 	# Create the PKI, set up the CA, the DH params and the server + client certificates | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 angristan
					angristan