diff --git a/VM_VPN_GATEWAY.sh b/VM_VPN_GATEWAY.sh index 4d7972d..23dbacc 100644 --- a/VM_VPN_GATEWAY.sh +++ b/VM_VPN_GATEWAY.sh @@ -14,10 +14,13 @@ source VM_CONFIG.sh # --- variaveis aqui pf joao fr fr fr aaaaa --- # helloworld="print" + if_fora="enp0s8" -if_dentro="enp0s9" ip_fora="193.136.212.1" + +if_dentro="enp0s9" ip_dentro="10.60.0.3" + mega_tunel="tun0" ip_mega_tunel="10.8.0.1/24" @@ -30,6 +33,7 @@ echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf sysctl -p /etc/sysctl.conf # --- nat forwardin de vpn para clientes --- # +# iptables -A INPUT -p udp --dport 1194 -j ACCEPT # :O iptables -A FORWARD -i $mega_tunel -o $if_dentro -j ACCEPT # :P iptables -A FORWARD -i $if_dentro -o $mega_tunel -j ACCEPT # ;) diff --git a/client.conf b/client.conf index 143e8b6..14c8150 100644 --- a/client.conf +++ b/client.conf @@ -15,4 +15,3 @@ auth-user-pass cipher AES-256-GCM auth SHA256 tls-auth /etc/openvpn/client/ta.key 1 -key-direction 1 diff --git a/vpn.conf b/vpn.conf index 5e347e4..46e5e2d 100644 --- a/vpn.conf +++ b/vpn.conf @@ -13,4 +13,3 @@ server 10.60.0.0 255.255.255.0 verb 4 plugin /usr/lib64/openvpn/plugins/openvpn-plugin-auth-pam.so openvpn tls-auth /etc/openvpn/server/ta.key 0 -key-direction 0