diff options
| author | Antoine Ouvrard <antoine.ouvrard@nereide.fr> | 2020-04-20 21:00:38 +0200 |
|---|---|---|
| committer | Antoine Ouvrard <antoine.ouvrard@nereide.fr> | 2020-04-20 21:00:38 +0200 |
| commit | dd883c8c1aa13766525d8f1466a574f627d61829 (patch) | |
| tree | fb05e15c2e75ce856c9f5c27e372060f02b19532 /roles/jitsi-pre-install/files/nftables.conf | |
| parent | 465876051e22fb7f986ff4ab7329c741382857bf (diff) | |
Resolve "execution des roles plus flexible"
Diffstat (limited to 'roles/jitsi-pre-install/files/nftables.conf')
| -rw-r--r-- | roles/jitsi-pre-install/files/nftables.conf | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/roles/jitsi-pre-install/files/nftables.conf b/roles/jitsi-pre-install/files/nftables.conf new file mode 100644 index 0000000..50857a9 --- /dev/null +++ b/roles/jitsi-pre-install/files/nftables.conf @@ -0,0 +1,35 @@ + +#!/usr/sbin/nftables -f + +flush ruleset + +# family `inet` c'est pour ipv4/ipv6 +table inet myfilter { + chain myglobal { + # par défaut on accepte tous les paquets entrant + type filter hook input priority 0; policy accept; + # accepte les ping (mais pas plus de 1 par seconde) + ip protocol icmp icmp type { echo-request, echo-reply } limit rate 1/second accept + ip protocol icmp icmp type { echo-request, echo-reply } drop + ip6 nexthdr icmpv6 icmpv6 type { echo-request, echo-reply } limit rate 1/second accept + ip6 nexthdr icmpv6 icmpv6 type { echo-request, echo-reply } drop + # on accepte tout le reste du traffic icmp + ip protocol icmp accept + ip6 nexthdr icmpv6 accept + # accepte le traffic qui vient de nous + ct state established,related accept + ct state invalid drop + # accepte le traffic localhost + iif lo accept + # accepte tout le traffic ssh peut importe l'origine + tcp dport 22 accept + # accepte le traffic tcp depuis le reste du monde si la cible est un des ports http, https, smtp + tcp dport {80, 443} accept + # ouvre les port udp I/O 10000 et 44446 pour jitsi + udp dport {10000, 4446} accept + udp sport {10000, 4446} accept + + # count and drop any other traffic + counter drop + } +} |
