Składnia filtrów

[src|dst] host <host> - pozwala filtrować po adresie IP określając czy interesuje nas host źródłowy czy docelowy

ether [src|dst] host <ehost> - pozwala filtrować po adresie ethernetowym określając czy interesuje nas host źródłowy czy docelowy

gateway host <host> - pozwala filtrować pakiety dla których gatewayem jest jeden z hostów

[src|dst] net <net> [{mask<mask>}|{len <len>}] – filtrowanie po masce sieci

[tcp|udp] [src|dst] port <port> - pozwala filtrować po numerach portów UDP i TCP

less|greater <length> - pozwala filtrować po długości pakietów

ip|ether proto <protocol> - pozwala filtrować po rodzaju protokołu IP lub Ethernet

ether|ip broadcast|multicast – pozwala filtrować pakiety broadcast lub multicast po protokołach IP lub Ethernet

<expr> relop <expr> - pozwala filtrować porównując określone bajty lub ciągi bajtów w każdym z pakietów

Przykłady:

Ruch dla usługi telnet konkretnego hosta

tcp port 23 and host 10.0.0.5

 

Ruch dla usługi telnet bez kokretnego hosta

tcp port 23 and not host 10.0.0.5