mirror of
https://github.com/YunoHost-Apps/wireguard_ynh.git
synced 2024-09-03 20:35:58 +02:00
commit
40e626cfa0
3 changed files with 32 additions and 4 deletions
15
README.md
15
README.md
|
@ -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.
|
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.
|
### Make your server share its Internet connection
|
||||||
Replace `eth0` with the interface connected to the Internet.
|
|
||||||
|
#### 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
|
#### Post Up Script
|
||||||
```
|
```
|
||||||
|
|
15
README_fr.md
15
README_fr.md
|
@ -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.
|
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`.
|
### Partager la connexion Internet de votre serveur
|
||||||
Remplacez `eth0` par l'interface connectée à l'Internet.
|
|
||||||
|
#### 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
|
#### Post Up Script
|
||||||
```
|
```
|
||||||
|
|
|
@ -94,6 +94,12 @@ then
|
||||||
ynh_exec_warn_less yunohost firewall disallow TCP $port_wg
|
ynh_exec_warn_less yunohost firewall disallow TCP $port_wg
|
||||||
fi
|
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
|
# SPECIFIC REMOVE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue