# Configuration de NFtables

**URL:** <https://www.debian-fr.org/t/configuration-de-nftables/79659>\
**Category:** Support Debian\
**Created:** [Juillet 17, 2019, 5:26 UTC](https://www.debian-fr.org/t/configuration-de-nftables/79659 "2019-07-17T17:26:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![scam](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/s/4491bb/32.png) [@scam](https://www.debian-fr.org/u/scam)\
**Post date:** [Juillet 17, 2019, 5:26 UTC](https://www.debian-fr.org/t/configuration-de-nftables/79659/1 "2019-07-17T17:26:53Z")

</div>

Bonjour, j’avance dans ma découverte de NFtables  
Après l’installation, je passe à la découverte des paramétrages…

Sur les conseil de @grandtoubab , j’ai fait un :  
`cp /usr/share/doc/nftables/examples/workstation.nft /etc/nftables.conf`

et je me retrouve avec :

```
 chain input {

        type filter hook input priority 0; policy accept;

        iif "lo" accept

        ct state established,related accept

        tcp dport { ssh, http, https, 8200 } ct state new accept

        ip6 nexthdr ipv6-icmp icmpv6 type { nd-router-advert, nd-neighbor-solicit, nd-neighbor-advert } accept

        counter packets 3504 bytes 1523021 drop

    }

```

J’ai commencé à lire le tuto [https://www.it-connect.fr/chapitres/gestion-des-regles-dans-nftables/](https://www.it-connect.fr/chapitres/gestion-des-regles-dans-nftables/)

Mais toutes les infos ne sont pas présentes

par exemple : `iif "lo" accept` n’est pas expliquée.

---

<div class="post-metadata">

**Author:** ![Albert](https://www.debian-fr.org/user_avatar/www.debian-fr.org/albert/32/8474_2.png) [@Albert](https://www.debian-fr.org/u/Albert)\
**Post date:** [Juillet 17, 2019, 6:04 UTC](https://www.debian-fr.org/t/configuration-de-nftables/79659/2 "2019-07-17T18:04:28Z")

</div>

Bonjour,  
Je ne connais rien à NFtables, mais le iif apparaît [ici](https://wiki.nftables.org/wiki-nftables/index.php/Quick_reference-nftables_in_10_minutes)

---

<div class="post-metadata">

**Author:** ![grandtoubab](https://www.debian-fr.org/user_avatar/www.debian-fr.org/grandtoubab/32/4505_2.png) [@grandtoubab](https://www.debian-fr.org/u/grandtoubab)\
**Post date:** [Juillet 18, 2019, 4:58 UTC](https://www.debian-fr.org/t/configuration-de-nftables/79659/3 "2019-07-18T04:58:05Z")

</div>

le contenu du fichier exemple fourni par Debian, **avec les commentaires** , est explicite:

```auto
cat /usr/share/doc/nftables/examples/workstation.nft

#!/usr/sbin/nft -f

flush ruleset

table inet filter {
	chain input {
		type filter hook input priority 0;

		# accept any localhost traffic
		iif lo accept

		# accept traffic originated from us
		ct state established,related accept

		# activate the following line to accept common local services
		#tcp dport { 22, 80, 443 } ct state new accept

		# accept neighbour discovery otherwise IPv6 connectivity breaks.
		ip6 nexthdr icmpv6 icmpv6 type { nd-neighbor-solicit, nd-router-advert, nd-neighbor-advert } accept

		# count and drop any other traffic
		counter drop
	}
}

```

[https://www.giac.org/paper/gsec/22279/nftables-second-language/120658](https://www.giac.org/paper/gsec/22279/nftables-second-language/120658)

dit:

> [@](#):
>
> Nftables similarly uses different options depending on the direction. If reading from the interface use iif and if writing to the interface use oif.

Voir aussi

> **[nft(8) — nftables — Debian testing — Debian Manpages](https://manpages.debian.org/testing/nftables/nft.8.en.html)**
