« Pihole firewall » : différence entre les versions

Aucun résumé des modifications
 
(5 versions intermédiaires par le même utilisateur non affichées)
Ligne 8 : Ligne 8 :
ufw allow 5335/udp
ufw allow 5335/udp
ufw allow 67/udp
ufw allow 67/udp
ufw allow 68/udp
ufw allow 51820/udp
ufw allow 51820/udp
ufw allow from 192.168.1.0/24 to any port 80 proto tcp
ufw allow from 192.168.1.0/24 to any port 80 proto tcp
ufw allow from 192.168.1.0/24 to any port 443 proto tcp
ufw allow from 192.168.1.0/24 to any port 443 proto tcp
ufw allow from 192.168.1.0/24 to any port 8082 proto tcp
ufw allow from 192.168.1.0/24 to any port 8082 proto tcp
ufw allow from 10.131.215.0/24 to any port 80 proto tcp
ufw allow from 12.12.12.0/24 to any port 80 proto tcp
ufw allow from 10.131.215.0/24 to any port 443 proto tcp
ufw allow from 12.12.12.0/24 to any port 443 proto tcp
ufw allow from 10.131.215.0/24 to any port 8082 proto tcp
ufw allow from 12.12.12.0/24 to any port 8082 proto tcp


# autoriser le trafic entre l'interface WireGuard (wg0) et l'interface Ethernet (eth0)
# autoriser le trafic entre l'interface WireGuard (wg0) et l'interface Ethernet (eth0)
ufw route allow in on wg0 out on eth0
ufw route allow in on wg0 out on eth0
ufw route allow in on eth0 out on wg0
ufw route allow in on eth0 out on wg0
echo "Backup ufw OK."
exit 0
</syntaxhighlight>
</syntaxhighlight>


Ligne 30 : Ligne 27 :
sudo ufw default deny incoming
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw default allow outgoing
sudo ufw allow from 192.168.1.0/24 to any port 22 proto tcp
sudo ufw allow from 192.168.1.0/24 to any port 2013 proto tcp
sudo bash ufw_rules_backup.sh
sudo bash ufw_rules_backup.sh
sudo ufw enable
sudo ufw enable