diff --git a/vpn/openvpn/servidor.md b/vpn/openvpn/servidor.md index 973a7c1..dca034a 100644 --- a/vpn/openvpn/servidor.md +++ b/vpn/openvpn/servidor.md @@ -2,7 +2,7 @@ title: OpenVPN - Servidor description: Tutorial de instalación del Servidor OpenVPN published: true -date: 2022-05-24T22:03:46.615Z +date: 2022-05-24T22:28:31.778Z tags: vpn, servidor, debian editor: markdown dateCreated: 2022-05-18T16:48:57.246Z @@ -617,7 +617,7 @@ table ip nat { ``` ```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 ``` @@ -727,9 +727,7 @@ sudo apt install nginx-core nginx-common nginx nginx-full apache2-utils ``` ```bash -mkdir -p ~/client-configs/web - -cd ~/client-configs/web +cd /var/www sudo htpasswd -c .htpasswd client1 ``` @@ -775,6 +773,7 @@ http { ```bash sudo dd if=/dev/null of=/etc/nginx/sites-available/default && sudo vim /etc/nginx/sites-available/default +``` ```bash server { @@ -790,7 +789,23 @@ server { location /download { try_files $uri $uri/ =404; auth_basic "Client Area"; - auth_basic_user_file /home/ovpn/client-configs/web/.htpasswd; + auth_basic_user_file /var/www/.htpasswd; } } -``` \ No newline at end of file +``` + + +[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 +```