docs: update vpn/openvpn/servidor
This commit is contained in:
parent
06e5e375e3
commit
a14d055f0c
@ -2,7 +2,7 @@
|
||||
title: OpenVPN - Servidor
|
||||
description: Tutorial de instalación del Servidor OpenVPN
|
||||
published: true
|
||||
date: 2022-05-24T14:03:11.931Z
|
||||
date: 2022-05-24T22:03:46.615Z
|
||||
tags: vpn, servidor, debian
|
||||
editor: markdown
|
||||
dateCreated: 2022-05-18T16:48:57.246Z
|
||||
@ -711,3 +711,86 @@ push "dhcp-option DNS 10.8.0.1"
|
||||
```bash
|
||||
sudo systemctl restart openvpn@server.service && sudo systemctl status openvpn@server.service
|
||||
```
|
||||
|
||||
## Landing Page para descarga de configuración cliente
|
||||
|
||||
```bash
|
||||
curl -sSL https://packages.sury.org/nginx/README.txt | sudo bash -x
|
||||
```
|
||||
|
||||
```bash
|
||||
sudo apt update
|
||||
```
|
||||
|
||||
```bash
|
||||
sudo apt install nginx-core nginx-common nginx nginx-full apache2-utils
|
||||
```
|
||||
|
||||
```bash
|
||||
mkdir -p ~/client-configs/web
|
||||
|
||||
cd ~/client-configs/web
|
||||
|
||||
sudo htpasswd -c .htpasswd client1
|
||||
```
|
||||
|
||||
```bash
|
||||
sudo dd if=/dev/null of=/etc/nginx/nginx.conf && sudo vim /etc/nginx/nginx.conf
|
||||
```
|
||||
|
||||
```bash
|
||||
user www-data;
|
||||
worker_processes auto;
|
||||
pid /run/nginx.pid;
|
||||
include /etc/nginx/modules-enabled/*.conf;
|
||||
|
||||
events {
|
||||
worker_connections 768;
|
||||
}
|
||||
|
||||
http {
|
||||
brotli on;
|
||||
brotli_comp_level 6;
|
||||
brotli_static on;
|
||||
brotli_types application/atom+xml application/javascript application/json application/rss+xml
|
||||
application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype
|
||||
application/x-font-ttf application/x-javascript application/xhtml+xml application/xml
|
||||
font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon
|
||||
image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml;
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
types_hash_max_size 2048;
|
||||
server_tokens off;
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log;
|
||||
gzip on;
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
}
|
||||
```
|
||||
|
||||
```bash
|
||||
sudo dd if=/dev/null of=/etc/nginx/sites-available/default && sudo vim /etc/nginx/sites-available/default
|
||||
|
||||
```bash
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
root /var/www/html;
|
||||
|
||||
index index.html;
|
||||
|
||||
server_name _;
|
||||
|
||||
location /download {
|
||||
try_files $uri $uri/ =404;
|
||||
auth_basic "Client Area";
|
||||
auth_basic_user_file /home/ovpn/client-configs/web/.htpasswd;
|
||||
}
|
||||
}
|
||||
```
|
Loading…
x
Reference in New Issue
Block a user