1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wireguard_ynh.git synced 2024-09-03 20:35:58 +02:00

Merge pull request #14 from YunoHost-Apps/testing

Testing to master
This commit is contained in:
tituspijean 2021-03-06 16:59:17 +01:00 committed by GitHub
commit 40e626cfa0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 4 deletions

View file

@ -25,8 +25,19 @@ This app installs WireGuard, a software to create and manage virtual private net
WireGuard can be configured via a non-official web UI. Avoid altering the configuration files via the command line interface, though.
If you want to use the server as an endpoint for your clients' Internet connection, add the following commands in `WireGuard Server` menu.
Replace `eth0` with the interface connected to the Internet.
### Make your server share its Internet connection
#### Enable port forwarding
```bash
sudo nano /etc/sysctl.conf
# It should have an uncommented line:
net.ipv4.ip_forward = 1
# Save and quit (CTRL+O, CTRL+X)
sudo sysctl -p
```
Add the following commands in `WireGuard Server` menu. Replace `eth0` with the interface connected to the Internet:
#### Post Up Script
```

View file

@ -25,8 +25,19 @@ Cette application installe WireGuard, logiciel permettant de créer des réseaux
WireGuard est configurable via une web UI non-officielle. Évitez de toucher aux fichiers de configuration via la ligne de commande.
Si vous souhaitez utiliser votre serveur comme point d'accès pour la connexion Internet de vos clients, ajoutez les commandes suivantes dans le menu `WireGuard Server`.
Remplacez `eth0` par l'interface connectée à l'Internet.
### Partager la connexion Internet de votre serveur
#### Activer le *port forwarding*
```bash
sudo nano /etc/sysctl.conf
# It should have an uncommented line:
net.ipv4.ip_forward = 1
# Save and quit (CTRL+O, CTRL+X)
sudo sysctl -p
```
Ajoutez les commandes suivantes dans le menu `WireGuard Server`. Remplacez `eth0` par l'interface connectée à l'Internet.
#### Post Up Script
```

View file

@ -94,6 +94,12 @@ then
ynh_exec_warn_less yunohost firewall disallow TCP $port_wg
fi
if yunohost firewall list | grep -q "\- $port$"
then
ynh_script_progression --message="Closing port $port..." --weight=1
ynh_exec_warn_less yunohost firewall disallow TCP $port
fi
#=================================================
# SPECIFIC REMOVE
#=================================================