docs: update vpn/openvpn/servidor

This commit is contained in:
José Antonio Yáñez Jiménez 2022-05-24 22:28:35 +00:00 committed by José Antonio Yáñez Jiménez
parent 467f2ba1c7
commit 0e735ad83f

View File

@ -2,7 +2,7 @@
title: OpenVPN - Servidor title: OpenVPN - Servidor
description: Tutorial de instalación del Servidor OpenVPN description: Tutorial de instalación del Servidor OpenVPN
published: true published: true
date: 2022-05-24T22:03:46.615Z date: 2022-05-24T22:28:31.778Z
tags: vpn, servidor, debian tags: vpn, servidor, debian
editor: markdown editor: markdown
dateCreated: 2022-05-18T16:48:57.246Z dateCreated: 2022-05-18T16:48:57.246Z
@ -617,7 +617,7 @@ table ip nat {
``` ```
```bash ```bash
sudo systemctl start nftables.service && sudo systemctl status nftables.service sudo systemctl restart nftables.service && sudo systemctl status nftables.service
sudo systemctl enable nftables.service sudo systemctl enable nftables.service
``` ```
@ -727,9 +727,7 @@ sudo apt install nginx-core nginx-common nginx nginx-full apache2-utils
``` ```
```bash ```bash
mkdir -p ~/client-configs/web cd /var/www
cd ~/client-configs/web
sudo htpasswd -c .htpasswd client1 sudo htpasswd -c .htpasswd client1
``` ```
@ -775,6 +773,7 @@ http {
```bash ```bash
sudo dd if=/dev/null of=/etc/nginx/sites-available/default && sudo vim /etc/nginx/sites-available/default sudo dd if=/dev/null of=/etc/nginx/sites-available/default && sudo vim /etc/nginx/sites-available/default
```
```bash ```bash
server { server {
@ -790,7 +789,23 @@ server {
location /download { location /download {
try_files $uri $uri/ =404; try_files $uri $uri/ =404;
auth_basic "Client Area"; auth_basic "Client Area";
auth_basic_user_file /home/ovpn/client-configs/web/.htpasswd; auth_basic_user_file /var/www/.htpasswd;
} }
} }
``` ```
[bastionado-vpn.tar](/assets/files/bastionado-vpn.tar)
```bash
scp -i .\.ssh\id_admin_bastionado .\bastionado-vpn.tar ovpn@ovpn.bastionado.es:/home/ovpn
sudo tar -xvf bastionado-vpn.tar -C /var/www/html
sudo cp /home/ovpn/client-configs/files/bastionado-client1.ovpn /var/www/html/download
sudo chown -R www-data:www-data /var/www
sudo find /var/www -type f -print0|sudo xargs -0 chmod 660
sudo find /var/www -type d -print0|sudo xargs -0 chmod 770
```