Règles de pare-feu
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p tcp --dport 2021 -m state --state NEW -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -m state --state NEW -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -m state --state NEW -j ACCEPT
iptables -A INPUT -p tcp --dport 10050 -m state --state NEW -j ACCEPT
iptables -A INPUT -p tcp --dport 10051 -m state --state NEW -j ACCEPT
iptables -A INPUT -p tcp --dport 62354 -m state --state NEW -j ACCEPT
iptables -A INPUT -p ICMP --icmp-type 8 -j ACCEPT
iptables -A INPUT -j DROP
ip6tables -A INPUT -i lo -j ACCEPT
ip6tables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
ip6tables -A INPUT -p tcp --dport 2022 -m state --state NEW -j ACCEPT
ip6tables -A INPUT -p tcp --dport 80 -m state --state NEW -j ACCEPT
ip6tables -A INPUT -p tcp --dport 443 -m state --state NEW -j ACCEPT
ip6tables -A INPUT -p ICMPV6 --icmpv6-type 8 -j ACCEPT
ip6tables -A INPUT -j DROP
Pour ajouter grafana :
iptables -I INPUT 7 -p tcp -m tcp --dport 3000 -j ACCEPT
apt install iptables-persistent