Skip to content

benmotyka/openvpn-2fa-setup-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation


OpenVPN setup script

Script that installs and configures OpenVPN Community server and creates tools to manage it

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Common problems
  4. Contributing
  5. Contact

About The Project

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


Getting Started

Prerequisites

  • [Linux Rocky-8-ec2-8.5*, x86_64 instance]

Usage

  1. Clone this repo and enter project
    git clone https://github.com/benmotyka/openvpn-2fa-setup-script.git
    cd openvpn-2fa-setup-script/
  2. Install OpenVPN server:
     ./install.sh
    
  3. Add first user
    ./manage.sh create john

(back to top)

Common problems

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

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

Contact

Ben Motyka - LinkedIn - [email protected]

Project Link: https://github.com/benmotyka/openvpn-2fa-setup-script

(back to top)