1

I want to match all data from ens19 with the mac address 88:7e:25:d3:90:0b use table 147.

My idea is to mark the data from 88:7e:25:d3:90:0b and give it a fwmark 14. Then use ip rule to the specified route table

So I make this command

nft add rule filter input iif ens19 ether saddr = 88:7e:25:d3:90:0b mark set 147
Error: syntax error, unexpected '='
add rule filter input iif ens19 ether saddr = 88:7e:25:d3:90:0b mark set 147
          

What is the correct way to do this command?

Thanks

1 Answer 1

1

According to the documentation, the syntax you want is:

nft add rule filter input iif ens19 ether saddr 88:7e:25:d3:90:0b mark set 147
4
  • root@:~# nft add rule filter input iif ens19 ether saddr 88:7e:25:d3:90:0b mark set 147 Error: Could not process rule: No such file or directory add rule filter input iif ens19 ether saddr 88:7e:25:d3:90:0b mark set 147 ^^^^^^
    – zhihuiyuze
    Commented Aug 4, 2022 at 5:32
  • Thanks for helping, but this syntax is not correct
    – zhihuiyuze
    Commented Aug 4, 2022 at 5:34
  • nft add table ip filter nft add chain ip filter input { type filter hook input priority 0 \; } # create chain nft add rule filter input iif ens19 ether saddr 88:7e:25:d3:90:0b mark set 147
    – zhihuiyuze
    Commented Aug 4, 2022 at 10:17
  • 1
    After I add ip filter chain input it works
    – zhihuiyuze
    Commented Aug 4, 2022 at 10:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .