Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

Latest commit

 

History

History

Exercise 3

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Exercises 3


A Priori

Installing...

sudo - root

Desativar Firewall

systemctl stop iptables

yum install epel-release

OpenVPN installation in Linux

1. Install OpenVPN in Linux (available at https://openvpn.net)

yum install openvpn

2. Configure OpenVPN as a Linux service and to start at system boot

Mudar de Diretorio

cd /usr/share/doc/openvpn-2.4.12/sample/sample-config-files/

Copiar

cp client.conf /etc/openvpn/client/

Mudar de Diretorio

cd /etc/openvpn/client

Configurar

nano client.conf
ca ca.crt
cert client.crt
key client.key
  • NOTA: Os seguintes ficheiros/modificações tem que ser os mesmos tanto no servidor como no cliente:
# Diffie hellman parameters.
# Generate your own with:
#   openssl dhparam -out dh2048.pem 2048
dh dh2048.pem
# For extra security beyond that provided
# by SSL/TLS, create an "HMAC firewall"
# to help block DoS attacks and UDP port flooding.
#
# Generate with:
#   openvpn --genkey --secret ta.key
#
# The server and each client must have
# a copy of this key.
# The second parameter should be '0'
# on the server and '1' on the clients.
tls-auth ta.key 0 # This file is secret

Conectar

openvpn /etc/openvpn/client/client.conf
  • NOTA: Para o servidor é identico, trocar client por server e fazer os procedimentos acima:

Exemplos:

nano server.conf
openvpn /etc/openvpn/server/server.conf

Check

ping <ip>
route -n