Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente |
tech:backup-01 [30/12/2024 17:26] – [Adressage IP] LibertAdmin | tech:backup-01 [06/01/2025 17:38] (Version actuelle) – [Paquets installés] LibertAdmin |
---|
net.ipv6.conf.default.autoconf=0 | net.ipv6.conf.default.autoconf=0 |
vm.swappiness=0 | vm.swappiness=0 |
| </code> |
| |
| ==== Routages et pare-feu avec iptables ==== |
| |
| En prévision de la mise en place de machines virtuelles sur cette machine, nous devrons paramétrer un filtrage (cela dit, plus besoin de NAT !) |
| |
| <code bash> |
| ### IPV4 ### |
| |
| *nat |
| -A PREROUTING -d 95.216.12.179/128 -p tcp -m tcp --syn -m multiport --dports 80,443,1935 -m comment --comment "Router le trafic Web vers le serveur web-02" -j DNAT --to-destination 192.168.10.105 |
| -A POSTROUTING -s 192.168.10.0/24 -d 224.0.0.0/24 -m comment --comment "Ne pas appliquer le masquerading sur le broadcast/multicast" -j RETURN |
| -A POSTROUTING -s 192.168.10.0/24 -d 255.255.255.255/32 -m comment --comment "Ne pas appliquer le masquerading sur le broadcast/multicast" -j RETURN |
| -A POSTROUTING -s 192.168.10.0/24 ! -d 192.168.10.0/24 -p tcp -m comment --comment "Masquerading sur tous les ports dans le sens sortant (VM -> Internet)" -j MASQUERADE --to-ports 1024-65535 |
| -A POSTROUTING -s 192.168.10.0/24 ! -d 192.168.10.0/24 -p udp -m comment --comment "Masquerading sur tous les ports dans le sens sortant (VM -> Internet)" -j MASQUERADE --to-ports 1024-65535 |
| -A POSTROUTING -s 192.168.10.0/24 ! -d 192.168.10.0/24 -m comment --comment "" -j MASQUERADE |
| COMMIT |
| *filter |
| -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -m comment --comment "Accepter le trafic des connexions établies, en entrée" -j ACCEPT |
| -A INPUT -i lo -m comment --comment "Accepter le trafic basique depuis la boucle locale, en entrée"-j ACCEPT |
| -A INPUT -p icmp --icmp-type 8 -m conntrack --ctstate NEW -m comment --comment "Accepter le trafic basique ICMP, en entrée" -j ACCEPT |
| -A INPUT -p tcp -m tcp --syn -m conntrack --ctstate NEW --dport 22 -m comment --comment "Accepter le SSH" -j ACCEPT |
| -A INPUT -p tcp -m tcp --syn -m conntrack --ctstate NEW --dport 1984 -m comment --comment "Accepter le SSH" -j ACCEPT |
| -A INPUT -p tcp -m tcp -m conntrack --ctstate NEW --dport 52365 -m comment --comment "Accepter le tunnel SSH vers le serveur web-01 sur le port 52365" -j ACCEPT |
| -A INPUT -i br2 -p udp -m udp -m multiport --dports 53 -m comment --comment "Accepter les requêtes DNS (port 53) depuis les VM" -j ACCEPT |
| -A INPUT -i br2 -p tcp -m tcp -m multiport --dports 53 -m comment --comment "Accepter les requêtes DNS (port 53) depuis les VM" -j ACCEPT |
| -A INPUT -i br2 -p tcp -m multiport --dport 2049 -m comment --comment "Bloquer les requêtes rpcbind/portmap en entrée depuis l'extérieur" -j ACCEPT |
| -A INPUT -i br2 -p tcp -m multiport --dport 111 -m comment --comment "Bloquer les requêtes rpcbind/portmap en entrée depuis l'extérieur" -j ACCEPT |
| -A INPUT -p tcp -s 127.0.0.1 --dport 111 -m comment --comment "Bloquer les requêtes rpcbind/portmap en entrée depuis l'extérieur" -j ACCEPT |
| -A INPUT -p udp --dport 111 -m comment --comment "Bloquer les requêtes rpcbind/portmap en entrée depuis l'extérieur" -j DROP |
| -A INPUT -p tcp --dport 111 -m comment --comment "Bloquer les requêtes rpcbind/portmap en entrée depuis l'extérieur" -j DROP |
| -A INPUT -i br2 -p tcp -m tcp -m multiport --dports 10050 -m comment --comment "Accepter les requêtes Zabbix passives (port 10050) depuis les VM" -j ACCEPT |
| -A INPUT -p icmp --icmp-type 8 -m conntrack --ctstate NEW -m limit --limit 1/s --limit-burst 1 -m comment --comment "On refuse les trop nombreux ping" -j ACCEPT |
| -A INPUT -p icmp -m comment --comment "On refuse les trop nombreux ping" -j DROP |
| -A INPUT -m conntrack --ctstate INVALID -m comment --comment "On refuse tout le reste" -j DROP |
| -A INPUT -p tcp -m tcp -m comment --comment "On refuse tout le reste" -j REJECT --reject-with tcp-reset |
| -A INPUT -m comment --comment "On refuse tout le reste" -j REJECT --reject-with icmp-port-unreachable |
| -A FORWARD -d 192.168.10.0/24 -o br2 -m conntrack --ctstate RELATED,ESTABLISHED -m comment --comment "Accepter les connexions établies sur le LAN" -j ACCEPT |
| -A FORWARD -s 192.168.10.0/24 -i br2 -m comment --comment "Accepter le trafic sortant depuis le LAN" -j ACCEPT |
| -A FORWARD -i br2 -o br2 -m comment --comment "Accepter le trafic interne entre les VM" -j ACCEPT |
| -A FORWARD -d 192.168.10.105/32 -o br2 -p tcp -m tcp --syn -m conntrack --ctstate NEW -m multiport --dports 80,443,1935 -m comment --comment "Accepter les paquets redirigés vers des ports particuliers pour le Web vers le serveur web" -j ACCEPT |
| -A FORWARD -d 192.168.10.250/32 -o br2 -p tcp -m tcp -m conntrack --ctstate NEW -m multiport --dports 8484 -m comment --comment "Accepter les paquets redirigés vers des ports particuliers pour le monitoring vers le serveur de monitoring" -j ACCEPT |
| -A INPUT -s 102.132.96.0/20 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 103.4.96.0/22 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 129.134.0.0/17 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 129.134.160.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 129.134.25.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 129.134.26.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 129.134.27.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 129.134.28.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 129.134.29.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 129.134.30.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 129.134.31.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 139.223.200.130/32 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.0.0/17 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.192.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.195.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.196.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.197.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.198.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.199.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.200.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.201.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.202.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.203.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.204.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.205.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.207.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.208.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.209.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.210.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.211.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.212.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.214.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.215.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.216.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.217.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.218.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.22.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.221.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.222.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.223.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.224.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.225.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.226.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.227.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.228.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.229.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.23.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.231.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.232.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.233.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.234.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.235.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.236.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.237.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.238.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.239.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.240.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.24.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.241.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.242.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.243.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.244.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.245.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.247.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.249.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.250.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.25.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.251.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.252.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.253.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.254.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.26.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.27.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.28.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.29.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.30.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.3.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.31.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.5.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.6.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.7.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.8.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 157.240.9.0/24 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 162.254.207.51/32 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 162.255.119.207/32 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 172.67.135.213/32 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 173.252.64.0/18 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 179.60.192.0/22 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 185.199.108.153/32 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 185.199.111.153/32 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 185.60.216.0/22 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 198.54.117.211/32 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 204.15.20.0/22 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 27.124.125.189/32 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 31.13.24.0/21 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 31.13.64.0/18 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 34.117.168.233/32 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 37.9.175.187/32 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 45.130.41.7/32 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 45.64.40.0/22 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 45.91.92.164/32 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 54.81.116.232/32 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 61.9.242.43/32 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 64.225.91.73/32 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 66.220.144.0/20 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 69.171.224.0/19 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 74.119.76.0/22 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 89.223.68.248/32 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A FORWARD -i br2 -m comment --comment "Rejeter tout le reste" -j REJECT --reject-with icmp-port-unreachable |
| -A FORWARD -o br2 -m comment --comment "Rejeter tout le reste" -j REJECT --reject-with icmp-port-unreachable |
| COMMIT |
| |
| ### IPV6 ### |
| |
| *filter |
| -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -m comment --comment "Accepter le trafic basique : ICMP, boucle locale et connexions établies, en entrée" -j ACCEPT |
| -A INPUT -i lo -m comment --comment "Accepter le trafic basique : ICMP, boucle locale et connexions établies, en entrée" -j ACCEPT |
| -A INPUT ! -i lo -d ::1/128 -m comment --comment "Accepter le trafic basique : ICMP, boucle locale et connexions établies, en entrée" -j REJECT |
| -A INPUT -p tcp -m tcp --syn -m conntrack --ctstate NEW --dport 22 -m comment --comment "Accepter le SSH" -j ACCEPT |
| -A INPUT -p tcp -m tcp --syn -m conntrack --ctstate NEW --dport 1984 -m comment --comment "Accepter le SSH" -j ACCEPT |
| -A INPUT -p tcp -m tcp -m conntrack --ctstate NEW --dport 52365 -m comment --comment "Accepter le tunnel SSH vers le serveur web-01 sur le port 52365" -j ACCEPT |
| -A INPUT -i br2 -p udp -m udp -m multiport --dports 53 -m comment --comment "Accepter les requêtes DNS (port 53) depuis les VM" -j ACCEPT |
| -A INPUT -i br2 -p tcp -m tcp -m multiport --dports 53 -m comment --comment "Accepter les requêtes DNS (port 53) depuis les VM" -j ACCEPT |
| -A INPUT -i br2 -p tcp -m multiport --dport 2049 -m comment --comment "Bloquer les requêtes rpcbind/portmap en entrée depuis l'extérieur" -j ACCEPT |
| -A INPUT -i br2 -p tcp -m multiport --dport 111 -m comment --comment "Bloquer les requêtes rpcbind/portmap en entrée depuis l'extérieur" -j ACCEPT |
| -A INPUT -p tcp -s ::1/128 --dport 111 -m comment --comment "Bloquer les requêtes rpcbind/portmap en entrée depuis l'extérieur" -j ACCEPT |
| -A INPUT -p udp --dport 111 -m comment --comment "Bloquer les requêtes rpcbind/portmap en entrée depuis l'extérieur" -j DROP |
| -A INPUT -p tcp --dport 111 -m comment --comment "Bloquer les requêtes rpcbind/portmap en entrée depuis l'extérieur" -j DROP |
| -A INPUT -i br2 -p tcp -m tcp -m multiport --dports 10050 -m comment --comment "Accepter les requêtes Zabbix passives (port 10050) depuis les VM" -j ACCEPT |
| -A INPUT -p icmpv6 --icmpv6-type parameter-problem -m comment --comment "On accepte l'ICMPv6 indispensable au fonctionnement d'IPv6" -j ACCEPT |
| -A INPUT -p icmpv6 --icmpv6-type echo-request -m comment --comment "On accepte l'ICMPv6 indispensable au fonctionnement d'IPv6" -j ACCEPT |
| -A INPUT -p icmpv6 --icmpv6-type echo-reply -m comment --comment "On accepte l'ICMPv6 indispensable au fonctionnement d'IPv6" -j ACCEPT |
| -A INPUT -p icmpv6 --icmpv6-type router-advertisement -m hl --hl-eq 255 -m comment --comment "On accepte l'ICMPv6 indispensable au fonctionnement d'IPv6" -j ACCEPT |
| -A INPUT -p icmpv6 --icmpv6-type router-solicitation -m hl --hl-eq 255 -m comment --comment "On accepte l'ICMPv6 indispensable au fonctionnement d'IPv6" -j ACCEPT |
| -A INPUT -p icmpv6 --icmpv6-type neighbour-advertisement -m hl --hl-eq 255 -m comment --comment "On accepte l'ICMPv6 indispensable au fonctionnement d'IPv6" -j ACCEPT |
| -A INPUT -p icmpv6 --icmpv6-type neighbour-solicitation -m hl --hl-eq 255 -m comment --comment "On accepte l'ICMPv6 indispensable au fonctionnement d'IPv6" -j ACCEPT |
| -A INPUT -p icmpv6 --icmpv6-type echo-request -m conntrack --ctstate NEW -m limit --limit 1/s --limit-burst 1 -m comment --comment "On refuse les trop nombreux ping" -j ACCEPT |
| -A INPUT -p icmpv6 --icmpv6-type echo-request -m comment --comment "On refuse les trop nombreux ping" -j DROP |
| -A INPUT -m conntrack --ctstate INVALID -m comment --comment "On refuse tout le reste en entrée" -j DROP |
| -A INPUT -m comment --comment "On refuse tout le reste en entrée" -j REJECT |
| -A FORWARD -d 2a01:4f9:2a:cc8::/64 -o br2 -m conntrack --ctstate RELATED,ESTABLISHED -m comment --comment "Accepter les connexions établies sur le LAN" -j ACCEPT |
| -A FORWARD -s 2a01:4f9:2a:cc8::/64 -i br2 -m comment --comment "Accepter le trafic sortant depuis le LAN" -j ACCEPT |
| -A FORWARD -i br2 -o br2 -m comment --comment "Accepter le trafic interne entre les VM" -j ACCEPT |
| -A FORWARD -d 2a01:4f9:2a:cc8::105/128 -o br2 -p tcp -m tcp --syn -m conntrack --ctstate NEW -m multiport --dports 80,443,1935 -m comment --comment "Accepter les paquets redirigés vers des ports particuliers pour le Web vers le serveur web (inutile, mais au cas où)" -j ACCEPT |
| -A INPUT -s 2620:0:1c00::/40 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2620:10d:c090::/44 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2a03:2880::/32 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2a03:2887:ff02::/47 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2a03:2887:ff19::/48 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2a03:2887:ff1b::/48 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2a03:2887:ff1c::/46 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2a03:2887:ff23::/48 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2a03:2887:ff25::/48 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2a03:2887:ff27::/48 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2a03:2887:ff28::/46 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2a03:2887:ff2f::/48 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2a03:2887:ff30::/48 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2a03:2887:ff35::/48 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2a03:2887:ff37::/48 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2a03:2887:ff38::/46 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2a03:2887:ff3f::/48 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2a03:2887:ff40::/48 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2a03:2887:ff43::/48 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2a03:2887:ff44::/47 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2a03:2887:ff48::/46 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2a03:2887:ff4d::/48 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2a03:2887:ff4e::/47 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2a03:2887:ff50::/47 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2a03:2887:ff52::/48 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2a03:2887:ff58::/47 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2c0f:ef78:3::/48 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2c0f:ef78:5::/48 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2c0f:ef78:6::/48 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2c0f:ef78:9::/48 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2c0f:ef78:d::/48 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2c0f:ef78:e::/47 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2c0f:ef78:11::/48 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A INPUT -s 2c0f:ef78:12::/48 -m comment --comment "Meta/Facebook/Instagram/Threads Adios!" -j DROP |
| -A FORWARD -i br2 -m comment --comment "Rejeter tout le reste" -j REJECT |
| -A FORWARD -o br2 -m comment --comment "Rejeter tout le reste" -j REJECT |
| COMMIT |
| |
</code> | </code> |
==== Paquets installés ==== | ==== Paquets installés ==== |
binutils-common:amd64 | binutils-common:amd64 |
binutils-x86-64-linux-gnu | binutils-x86-64-linux-gnu |
| bridge-utils |
bsdextrautils | bsdextrautils |
bsdutils | bsdutils |