This commit is contained in:
Vasco
2026-04-21 21:48:31 +01:00
parent 97c8b30452
commit f8b9d52a96
15 changed files with 59 additions and 70 deletions

View File

@@ -1,20 +1,15 @@
#!/bin/bash
# O road warrior ou gateway client liga a vpn gateway
# Via a rede externa 193.136.212.0/24
# Rede externa (enp0s8)
bash VM_CONFIG.sh
# --- interfaces --- #
# --- configuração --- #
source VM_CONFIG.sh
ifconfig enp0s8 193.136.212.10 netmask 255.255.255.0
route add default gw 193.136.212.1 # default gateway LIKE A SHEEP
route add default gw 193.136.212.1
# copiar tudo
# --- vpn client --- #
vpn_dir="/etc/openvpn/client/"
cp ca/ta.key $vpn_dir
cp ca/ca.crt $vpn_dir
cp ca/user.key $vpn_dir
cp ca/user.crt $vpn_dir
cp client.conf $vpn_dir
cp conf/client.conf $vpn_dir
openvpn --config "${vpn_dir}/client.conf"