Skip to main content
tmoe
New Member
Mar 4, 2011 3:08 PM UTC
Question

Sniffer syntax help.

Is there a way to define a port range in the sniffer? For example can I do: diagnose sniffer packet any ' host x.x.x.x and tcp port 6520-6540' Thank you in advance, Tom

    3 replies

    ede_pfau
    SuperUser
    SuperUser
    Mar 4, 2011 3:36 PM UTC
    The best I can come up with is
     diagnose sniffer packet any ' host x.x.x.x and ( tcp port 6520 or 6521 or 6522)'   
    and so on. No ' greater' , ' gt' , ' >' , ' portrange' tokens as it seems.
    Translate
    tmoe
    tmoeAuthor
    New Member
    Mar 4, 2011 5:39 PM UTC
    Argh...... Thanks for the confirmation.
    Translate
    emnoc
    New Member
    Mar 5, 2011 7:37 AM UTC
    btw: pcap expression filters allows for the execution of the portrange in the expression filters, but I don' t know how you would string this on the fortigate from my macosx for example kota:~ root# kota:~ root# tcpdump -i en1 -n -vvv portrange 80-100 tcpdump: listening on en1, link-type EN10MB (Ethernet), capture size 65535 bytes ede_pfau example would work, but could be tedious if you had a big range of ports. Also tcpdump expressions allow for using the portrange along with src or dst parameters e.g tcpdump dst portrange 80-100
    Translate
    Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024