30 lines
898 B
Plaintext
30 lines
898 B
Plaintext
|
|
table inet filter {
|
||
|
|
chain input {
|
||
|
|
type filter hook input priority 0; policy drop;
|
||
|
|
|
||
|
|
# 1. Autoriser le trafic interne (loopback)
|
||
|
|
iif "lo" accept
|
||
|
|
|
||
|
|
# 2. Autoriser les connexions déjà établies (réponses au trafic sortant)
|
||
|
|
ct state established,related accept
|
||
|
|
|
||
|
|
# 3. Autoriser le SSH (Port 22) - À adapter si tu as changé le port
|
||
|
|
tcp dport 22 accept
|
||
|
|
|
||
|
|
# 4. Autoriser le Ping (optionnel mais utile pour le diagnostic)
|
||
|
|
icmp type echo-request accept
|
||
|
|
icmpv6 type echo-request accept
|
||
|
|
|
||
|
|
# 5. Optionnel : Autoriser MariaDB (Port 3306)
|
||
|
|
# Uniquement si d'autres serveurs doivent se connecter à la DB
|
||
|
|
# tcp dport 3306 accept
|
||
|
|
}
|
||
|
|
|
||
|
|
chain forward {
|
||
|
|
type filter hook forward priority 0; policy drop;
|
||
|
|
}
|
||
|
|
|
||
|
|
chain output {
|
||
|
|
type filter hook output priority 0; policy accept;
|
||
|
|
}
|
||
|
|
}
|