[solved] nftables how add saddr to icmp ?

SpongeB0B

Member
Joined
Feb 11, 2022
Messages
30
Reaction score
7
Credits
270
Hi everyone,

How can we add saddr to icmp ?

for example

Code:
table ip Tip {
    type filter hook input priority 0; policy drop;
    icmp type echo-request counter log prefix "echo: " accept
}

How can I specify a source address ?
I've tried

Code:
table ip Tip {
    type filter hook input priority 0; policy drop;
    icmp type echo-request saddr 192.168.1.1 counter log prefix "echo: " accept
}

but nftables wont accept this.


any ideas ?

Thanks
 


Nevermind I found !


Code:
table ip Tip {
    type filter hook input priority 0; policy drop;
    icmp type echo-request ip saddr 192.168.1.1 counter log prefix "echo: " accept
}
 

Staff online


Top