Comments (2)
This step may help.
#!/bin/bash
Define the URLs for the OpenVPN installer and the Easy-RSA ZIP archive
openvpnInstallerUrl="https://openvpn.net/community-downloads/"
easyRsaZipUrl="https://github.com/OpenVPN/easy-rsa-old/archive/refs/tags/v2.3.3.zip"
Set up temporary directories for the installer and Easy-RSA
tmpDir=$(mktemp -d)
openvpnInstallerPath="$tmpDir/openvpn-install.exe"
easyRsaZipPath="$tmpDir/easy-rsa.zip"
easyRsaDir="$tmpDir/easy-rsa"
Download the OpenVPN installer and Easy-RSA ZIP archive
curl -L -o "$openvpnInstallerPath" "$openvpnInstallerUrl"
curl -L -o "$easyRsaZipPath" "$easyRsaZipUrl"
Install OpenVPN silently with default options
cmd.exe /C "$openvpnInstallerPath /S"
Extract the Easy-RSA ZIP archive
unzip -q "$easyRsaZipPath" -d "$tmpDir"
Move the Easy-RSA directory to the OpenVPN installation folder
mv "$tmpDir/easy-rsa-old-2.3.3" "/c/Program Files/OpenVPN/easy-rsa"
Navigate to the Easy-RSA directory
cd "/c/Program Files/OpenVPN/easy-rsa"
Run the initialization script to set environment variables
cmd.exe /C "vars.bat"
Clean any existing keys
cmd.exe /C "clean-all"
Build the Certificate Authority (CA)
cmd.exe /C "build-ca"
Generate the server key and certificate
cmd.exe /C "build-key-server your_server_name"
Generate Diffie-Hellman parameters (used for key exchange)
cmd.exe /C "build-dh"
Replace 'C:\path\to\server.ovpn' with the actual path to your server configuration file
serverConfigPath="C:\path\to\server.ovpn"
Copy the server configuration file to the config directory
cp "$serverConfigPath" "/c/Program Files/OpenVPN/config/"
Start the OpenVPN service
cmd.exe /C "openvpn-gui --command connect 'your_server_name'"
from simple-openvpn-server.
This would require almost a full rewrite. The UI is based on shell scripting, so I am not sure how I would accomplish that. Use a Linux VM as an alternative.
from simple-openvpn-server.
Related Issues (20)
- Auto revoke after 31 days HOT 8
- How to activate management? HOT 2
- rm /var/www/html/* HOT 1
- Uninstall script HOT 1
- AWS no internet HOT 5
- Job for lighttpd.service failed because the control process exited with error code. HOT 1
- Done APT-GET upgrade and service is not running any more HOT 2
- Cannot connect on HTTPS HOT 1
- NSG not associated with nic
- Error on Deployment with easyrsa not found
- Web GUI notload
- Let's encrypt failed with default email.
- Deployment error - Package certbot is not available, but is referred to by another package. HOT 4
- [intensifier]Encrypted with tls-crypt-v2
- comp-lzo deprecated HOT 1
- Remove comp-lzo option from client config HOT 6
- Feature Request: LDAP authentication to Azure Windows server HOT 2
- New lighttpd.conf HOT 5
- How to route only VPN/LAN subnet traffic over OpenVPN? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simple-openvpn-server.