|
@@ -14,35 +14,53 @@ L'installation se fait par un makefile:
|
|
|
make install
|
|
make install
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-#### Configuration
|
|
|
|
|
|
|
+## Configuration
|
|
|
|
|
|
|
|
-Editer le fichier `/etc/firewall/firewall.conf` et tester votre configuration
|
|
|
|
|
|
|
+Editer le fichier `/etc/lfirewall/lfirewall.conf` et tester votre configuration
|
|
|
|
|
|
|
|
|
|
|
|
|
-#### Test du firewall
|
|
|
|
|
|
|
+## Utilisation du firewall
|
|
|
|
|
+
|
|
|
|
|
+### Test
|
|
|
|
|
|
|
|
Le test se fait en tapant la commande suivante:
|
|
Le test se fait en tapant la commande suivante:
|
|
|
|
|
|
|
|
```bash
|
|
```bash
|
|
|
-$ sudo lightwall test
|
|
|
|
|
|
|
+$ sudo lfirewall test
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-#### Enable the firewall
|
|
|
|
|
-Once tested (you should at least be able to open a new ssh session when firewall is active with new configuration), you can enable and start it.
|
|
|
|
|
|
|
+### Arrêt
|
|
|
|
|
+
|
|
|
|
|
+Stopper se fait grâce au mot clé `dropall` ce qui arrête toutes les connexions.
|
|
|
|
|
+
|
|
|
|
|
+Pour supprimer tous les blocages utiliser `clear` :
|
|
|
|
|
+
|
|
|
```bash
|
|
```bash
|
|
|
-sudo systemctl enable firewall.service
|
|
|
|
|
-sudo systemctl start firewall.service
|
|
|
|
|
|
|
+sudo lfirewall clear
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-#### Stopping firewall
|
|
|
|
|
-Stopping will drop all connections (which is not really cool)
|
|
|
|
|
|
|
+Et pour fermer toutes les connexions :
|
|
|
|
|
|
|
|
-So to really clear all rules use (and open all in/out traffic):
|
|
|
|
|
```bash
|
|
```bash
|
|
|
-sudo service firewall clear
|
|
|
|
|
|
|
+sudo lfirewall dropall
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-And to really drop all rules use (and close all in/out traffic):
|
|
|
|
|
|
|
+
|
|
|
|
|
+#### Démarrage automatique du firewall
|
|
|
|
|
+
|
|
|
|
|
+Après avoir testé (vous devez au moins pouvoir ouvrir une session SSH une fois le firewall en route), vous pouvez mettre en place le service
|
|
|
|
|
+
|
|
|
|
|
+##### Obsolète: ancien système de démarrage (SysVinit)
|
|
|
|
|
+
|
|
|
|
|
+Le fichier `lfirewall` doit être placé dans `/etc/init.d` (il faut donc modifier le makefile
|
|
|
|
|
+
|
|
|
```bash
|
|
```bash
|
|
|
-sudo service firewall dropall
|
|
|
|
|
|
|
+sudo systemctl enable firewall.service
|
|
|
|
|
+sudo systemctl start firewall.service
|
|
|
```
|
|
```
|
|
|
|
|
+
|
|
|
|
|
+##### Systemd
|
|
|
|
|
+
|
|
|
|
|
+Mettez en place un système de démarrage utilisant `systemd`.
|
|
|
|
|
+
|
|
|
|
|
+Cette page donne un exemple complet: [How to write startup script for systemd](https://unix.stackexchange.com/questions/47695/how-to-write-startup-script-for-systemd)
|