Bonjour,
J’ai décidé de passer de iptable à nftable mais j’ai un petit soucis avec mon fichier de règles nftable que voici .
flush ruleset
table inet filter {
chain input {
type filter hook input priority 0;
iif lo accept
ct state established, related accept
tcp dport http accept
tcp dport https accept
tcp flag & (fin | syn | rst | psh | ack | urg) > urg counter packets 0 bytes 0
tcp flag & (fin | syn | rst | psh | ack | urg) < fin counter packets 0 bytes 0
icmp type echo-reply accept
icmpv6 type echo-reply accept
drop
}
chain forward {
type filter hook forward priority 0;
drop
}
chain output {
type filter hook output priority 0;
iif lo accept
ct state established, related accept
tcp dport https accept
udp dport domain accept
udp dport ntp accept
icmp type echo-request accept
icmpv6 type echo-request accept
drop
}
}
Or lorsque je fais /usr/sbin/nft -f nftables.txt
Voici toutes les erreurs que j’obtiens
nftables.rules:1:14-14: Error: syntax error, unexpected junk, expecting end of file or newline or semicolon
flush ruleset
^
nftables.rules:2:1-1: Error: syntax error, unexpected junk
^
nftables.rules:3:1-1: Error: syntax error, unexpected junk
^
nftables.rules:4:20-20: Error: syntax error, unexpected junk
table inet filter {
^
nftables.rules:5:16-16: Error: syntax error, unexpected junk
chain input {
Je suis sous debian 11
Merci de votre aide