#!/bin/bash
ufw allow from 192.168.1.0/24 to any port 22 proto tcp
ufw allow 53/tcp
ufw allow 53/udp
ufw allow 5335/tcp
ufw allow 5335/udp
ufw allow 67/udp
sudo ufw allow from 192.168.0.0/16 to any port 51820 proto udp
#VPN
#12.12.12.0/24 = vpn
#autorise seulement le prefix alloué par la box
ufw allow from 2001:db8:abcd:1111::/64 to any port 51820 proto udp
#autorise seulement la plage ipv4 alloué par wireguard
ufw allow from 12.12.12.0/24 to any port 51820 proto 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 443 proto tcp
ufw allow from 192.168.1.0/24 to any port 8082 proto tcp
ufw allow from 12.12.12.0/24 to any port 80 proto tcp
ufw allow from 12.12.12.0/24 to any port 443 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)
ufw route allow in on wg0 out on eth0
ufw route allow in on eth0 out on wg0