Skip to content

rhamdeew/ansible-docker-compose-openvpn-secure-centos8

Repository files navigation

Ansible Playbook for starting OpenVPN server on CentOS 8

Screencast on YouTube

You can see this playbook in action (from 1:06 to 4:05).

Software will be installed:

  • python 3
  • pip3
  • curl
  • git
  • vim
  • firewalld
  • tmux
  • make
  • fail2ban
  • docker
  • docker-compose

Usage

1. Init config file

make i

2. Add your public SSH-key to authorized_keys (optional)

cat ~/.ssh/id_rsa.pub > files/authorized_keys

3. Add server address to ansible_hosts

vim ~/.ansible_hosts

Example:

[test]
test_server1 ansible_user=root ansible_host=0.0.0.0

4. Edit main.yml

vim main.yml

username - the username on the server

uid - id of this user

security_ssh_port - custom SSH-port

variable_host - hostname from ansible_hosts file (example - test_server1)

5. Run The Playbook

make s

or without strict host checking

make ns

About

Ansible Playbook for starting OpenVPN server on CentOS 8

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published