• Check it out - we have a chatbot! Go ask TuxBot a question in the Ask Tuxbot section!

[solved] nftables how add saddr to icmp ?

SpongeB0B

New Member
Joined
Feb 11, 2022
Messages
28
Reaction score
7
Credits
258
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
 


OP
SpongeB0B

SpongeB0B

New Member
Joined
Feb 11, 2022
Messages
28
Reaction score
7
Credits
258
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
}
 
MALIBAL Linux Laptops

Linux Laptops Custom Built for You
MALIBAL is an innovative computer manufacturer that produces high-performance, custom laptops for Linux.

For more info, visit: https://www.malibal.com

Members online

No members online now.

Top