Configure su propia red privada con OpenVPN
Vultr le ofrece una increíble conectividad de red privada para servidores que se ejecutan en la misma ubicación. Pero a veces quieres dos servidores en diferentes países.
Web Distributed Authoring and Versioning (WebDAV) is a HTTP extension that provides a framework for remotely creating and modifying files on a server. WsgiDAV is a WebDAV server written in python. This guide will help you through the installation of WsgiDAV version 3.0 on a Vultr server running Debian 10. We will also obtain an SSL certificate to provide a secure connection as well as PAM authentication.
$EDITOR
environment variable must be set to a text editor of your choice.A
record pointing to your server's IPv4 address, and optionally an AAAA
record pointing to the IPv6 address.The placeholder dav.example.com
will be used for your server's domain name.
We will start by updating the system and obtaining a free SSL certificate from Let's Encrypt. To do so, first update your system and install the certbot
utility:
sudo apt update
sudo apt upgrade -y
sudo apt install -y certbot
In the command below, replace dav.example.com
and [email protected]
with your domain name and email address respectively before executing it:
sudo certbot certonly --standalone --agree-tos -m [email protected] -d dav.example.com
Your server will be sent a challenge to verify that you control the domain name specified. If it succeeds, the certificate will be issued and saved, along with other files such as the private key, under /etc/letsencrypt/live/dav.example.com/
.
First, install the python package manager pip
:
sudo apt update
sudo apt install -y python3-pip
WsgiDAV requires a HTTP server that supports WSGI. We will install the default option, which is Cheroot. We will also install the lxml python library, which tends to perform better than the XML library installed by default. The PAM (Pluggable Authentication Module) python3 library is needed as well. Install the required packages using the pip
tool:
sudo pip3 install wsgidav cheroot lxml python-pam
The WsgiDAV executable is stored in /usr/local/bin
, so we will place the configuration file in the /usr/local/etc
directory. Download the sample configuration file with the following commands:
sudo mkdir -p /usr/local/etc
sudo wget https://github.com/mar10/wsgidav/raw/master/sample_wsgidav.yaml -O /usr/local/etc/wsgidav.yaml
Open it with your editor:
sudo $EDITOR /usr/local/etc/wsgidav.yaml
Find the following lines in the "SSL Support" section:
# ssl_certificate: "wsgidav/server/sample_bogo_server.crt"
# ssl_private_key: "wsgidav/server/sample_bogo_server.key"
# ssl_certificate_chain: null
Replace them with the following:
ssl_certificate: "/etc/letsencrypt/live/dav.example.com/cert.pem"
ssl_private_key: "/etc/letsencrypt/live/dav.example.com/privkey.pem"
ssl_certificate_chain: "/etc/letsencrypt/live/dav.example.com/chain.pem"
Next, we will configure the share paths by mapping HTTP paths (such as /
) to corresponding locations on the filesystem (such as /var/www/dir1
). For demonstration purposes, we will share two directories, one of which will be read-only. Find the provider_mapping
block in the "SHARES" section:
provider_mapping:
"/": "/path/to/share1"
"/pub":
root: "/path/to/share2"
readonly: true
"/share3":
provider: path.to.CustomDAVProviderClass
args: ["/path/to/share3", "second_arg"]
kwargs: {"another_arg": 42}
Replace it:
provider_mapping:
"/":
root: "/var/www/html/documents"
readonly: false
"/reports":
root: "/var/www/html/reports"
readonly: true
With these mappings, https://dav.example.com:8080/
will correspond to the /var/www/html/documents
directory on the server, while https://dav.example.com:8080/reports
will map to /var/www/html/reports
with no write access.
For authentication, we will use the PAM driver. This removes the need for separate WebDAV user accounts and allows system users to login using their usual credentials.
In the "AUTHENTICATION" section, find these lines:
accept_basic: true
accept_digest: true
default_to_digest: true
domain_controller: null
Replace them with the following:
accept_basic: true
accept_digest: false
default_to_digest: false
domain_controller: wsgidav.dc.pam_dc.PAMDomainController
You can now test your server:
sudo wsgidav -c /usr/local/etc/wsgidav.yaml
Open https://dav.example.com:8080/
in your web browser. Since we configured PAM authentication, you will need to login with your Linux user account. Use CTRL + C to stop the server before proceeding.
In order to run your WebDAV server as a system service managed by systemd, create a unit file:
sudo $EDITOR /etc/systemd/system/wsgidav.service
Enter the following:
[Unit]
Description=WsgiDAV WebDAV server
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/bin/wsgidav -c /usr/local/etc/wsgidav.yaml
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=wsgidav_service
[Install]
WantedBy=multi-user.target
Then create a configuration file for the system logging service:
sudo $EDITOR /etc/rsyslog.d/wsgidav_service.conf
Populate the file with the following:
if $programname == 'wsgidav_service' then /var/log/wsgidav.log
& stop
Save and exit, then use the commands below to create the log file:
sudo touch /var/log/wsgidav.log
sudo chown root:adm /var/log/wsgidav.log
Finally, load the new systemd unit file and restart the logging service before starting WsgiDAV:
sudo systemctl daemon-reload
sudo systemctl restart rsyslog.service
sudo systemctl start wsgidav.service
You can now use systemctl
to start, stop and restart your WebDAV server. WsgiDAV's standard output and error will be logged to /var/log/wsgidav.log
, and can also be accessed using sudo journalctl -u wsgidav.service
.
If you want the WebDAV server to start automatically at system boot time, execute:
sudo systemctl enable wsgidav.service
Vultr le ofrece una increíble conectividad de red privada para servidores que se ejecutan en la misma ubicación. Pero a veces quieres dos servidores en diferentes países.
¿Usando un sistema diferente? Couch CMS es un sistema de gestión de contenido (CMS) simple y flexible, gratuito y de código abierto que permite a los diseñadores web diseñar
Usar un usuario sudo para acceder a un servidor y ejecutar comandos a nivel raíz es una práctica muy común entre Linux y Unix Systems Administrator. El uso de un sud
Este artículo le enseñará cómo configurar una cárcel chroot en Debian. Supongo que está utilizando Debian 7.x. Si está ejecutando Debian 6 u 8, esto puede funcionar, pero
Introduction An easy way to set up a VPN server on Debian is with PiVPN. PiVPN is an installer and wrapper for OpenVPN. It creates simple commands for you t
Using a Different System? Introduction Kanboard is a free and open source project management software program which is designed to facilitate and visualiz
Using a Different System? Neos is a Content Application Platform with a CMS and an application framework at its core. This guide will show you how to instal
Introducción Cacti es una herramienta de monitoreo y gráficos de código abierto que se basa completamente en datos RRD. A través de Cacti, puedes monitorear casi cualquier tipo de dispositivo
Java es un lenguaje de programación / máquina virtual independiente de la plataforma. En este tutorial, instalaremos la implementación de OpenJDK de Java 8 en un Debian
Git es un sistema de control de versiones (VCS) que permite el seguimiento de cambios en el código. En este tutorial, veremos cómo instalar un servidor HTTP (S) Git, un
Introducción MySQL tiene una gran característica conocida como vistas. Las vistas son consultas almacenadas. Piense en ellos como un alias para una consulta larga. En esta guía,
Using a Different System? Matomo (formerly Piwik) is an open source analytics platform, an open alternative to Google Analytics. Matomo source is hosted o
Hiawatha es un servidor web que tiene en cuenta la simplicidad, la facilidad de uso y la seguridad. Es la solución perfecta para servidores más pequeños, hardware antiguo o incrustación
Munin es una herramienta de monitoreo para examinar procesos y recursos en su máquina y presenta la información en gráficos a través de una interfaz web. Usa el siguiente
¿Usando un sistema diferente? En esta guía, veremos cómo configurar un servidor FTP (ProFTPd) para transferir archivos entre su PC y su servidor.
Using a Different System? NodeBB is a Node.js based forum. It utilizes web sockets for instant interactions and real-time notifications. NodeBB source code i
¿Usando un sistema diferente? TaskWarrior es una herramienta de gestión de tiempo de código abierto que es una mejora en la aplicación Todo.txt y sus clones. Debido a th
Introduction Debian 10 (Buster), is the successor to Debian 9 (Stretch). It was released on July 6, 2019. In this tutorial, we will be upgrading an existin
Introducción En este tutorial, cubriremos el proceso de agregar un rango / subred de IP completo a un servidor Linux que ejecuta CentOS, Debian o Ubuntu. El proceso
¿Usando un sistema diferente? Plesk es un panel de control de alojamiento web patentado que permite a los usuarios administrar sus sitios web y bases de datos personales y / o de clientes
ZPanel, un panel de control de alojamiento web popular, se bifurcó en 2014 a un nuevo proyecto llamado Sentora. Aprende a instalar Sentora en tu servidor con este tutorial.
Aprende cómo instalar Vtiger CRM, una aplicación de gestión de relaciones con el cliente, en CentOS 7 para aumentar tus ventas y mejorar el servicio al cliente.
Esta guía completa le mostrará cómo configurar un servidor Counter-Strike 1.6 en Linux, optimizando el rendimiento y la seguridad para el mejor juego. Aprende los pasos más recientes aquí.
Los ataques de ransomware van en aumento, pero ¿puede la IA ayudar a lidiar con el último virus informático? ¿Es la IA la respuesta? Lea aquí, sepa que la IA es una bendición o una perdición
ReactOS, un sistema operativo de código abierto y gratuito, está aquí con la última versión. ¿Puede satisfacer las necesidades de los usuarios de Windows de hoy en día y acabar con Microsoft? Averigüemos más sobre este estilo antiguo, pero una experiencia de sistema operativo más nueva.
Whatsapp finalmente lanzó la aplicación de escritorio para usuarios de Mac y Windows. Ahora puede acceder a Whatsapp desde Windows o Mac fácilmente. Disponible para Windows 8+ y Mac OS 10.9+
Lea esto para saber cómo la Inteligencia Artificial se está volviendo popular entre las empresas de pequeña escala y cómo está aumentando las probabilidades de hacerlas crecer y dar ventaja a sus competidores.
Recientemente, Apple lanzó macOS Catalina 10.15.4, una actualización complementaria para solucionar problemas, pero parece que la actualización está causando más problemas que conducen al bloqueo de las máquinas Mac. Lee este artículo para obtener más información
13 Herramientas comerciales de extracción de datos de Big Data
Nuestra computadora almacena todos los datos de una manera organizada conocida como sistema de archivos de diario. Es un método eficiente que permite a la computadora buscar y mostrar archivos tan pronto como presiona buscar.