Table of Contents
This script installs and configures OpenVPN Community server and creates tools to manage it, such as:
- adding new user (username, password and Google Authenticator 2FA)
- removing existing user.
Script was adjusted specifically for Linux Rocky-8-ec2-8.5*, x86_64 (on AWS) and its dependencies.
Based on the following repository: https://github.com/perfecto25/openvpn_2fa
- [Linux Rocky-8-ec2-8.5*, x86_64 instance]
- Clone this repo and enter project
git clone https://github.com/benmotyka/openvpn-2fa-setup-script.git cd openvpn-2fa-setup-script/
- Install OpenVPN server:
./install.sh
- Add first user
./manage.sh create john
Issue Can't import .ovpn file because of unknown dhcp-option
Resolution Remove dhcp-option DOMAIN-ROUTE .
line from client .ovpn file
Issue Can't connect to server because of TEST ROUTES: 0/0 succeeded len=-1 ret=0 a=0 u/d=down
, Initialization Sequence Completed With Errors ( see http://openvpn.net/faq.html#dhcpclientserv )
connection logs
Resolution Run below commands in cmd.exe as admin:
netsh winsock reset catalog
netsh int ipv4 reset reset.log
Add below line to client .ovpn file:
ip-win32 netsh
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Ben Motyka - LinkedIn - [email protected]
Project Link: https://github.com/benmotyka/openvpn-2fa-setup-script