LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-12-2022, 06:21 AM   #1
pingu_penguin
Member
 
Registered: Aug 2004
Location: pune
Distribution: Slackware
Posts: 350

Rep: Reputation: 60
Help with ngrep


Hi,
I gave ngrep a try and tried to monitor some ping packets to google.com only.

So I go :
# ngrep -q -d eth0 '' icmp
first , which show me all ping packets. Fine enough.

However when I try to filter by domain:
# ngrep -q -d eth0 '' icmp and dst host google.com

I get to see the icmp packets to other locations as well.

I would like to see the ping to google only.
What am I missing or doing inherently wrong here ?

Thanks.
 
Old 11-12-2022, 07:47 AM   #2
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,138
Blog Entries: 6

Rep: Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827Reputation: 1827
I've never used that. Best that I can do.
https://github.com/jpr5/ngrep/
https://man.archlinux.org/man/commun...rep/ngrep.8.en
 
Old 11-12-2022, 08:31 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by pingu_penguin View Post
Hi,
I gave ngrep a try and tried to monitor some ping packets to google.com only.

So I go :
# ngrep -q -d eth0 '' icmp
first , which show me all ping packets. Fine enough.

However when I try to filter by domain:
# ngrep -q -d eth0 '' icmp and dst host google.com

I get to see the icmp packets to other locations as well. I would like to see the ping to google only. What am I missing or doing inherently wrong here ?
As teckk said, the man page is where you can figure out the syntax for that command. And since you don't show us the input you're getting, or show us a sample of the output, we can't guess as to what you need to get what you're after.

Lots of ngrep examples; have you looked for any?
Code:
ngrep -q -d eth0 icmp "google.com"
 
Old 11-12-2022, 08:50 AM   #4
pingu_penguin
Member
 
Registered: Aug 2004
Location: pune
Distribution: Slackware
Posts: 350

Original Poster
Rep: Reputation: 60
Okay ngrep seems to be working as expected.
This is weird, honestly, I don't know what to say.

Thanks for your time folks, I will update the thread with more ngrep queries if needed.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help processing ngrep data needed! GaWdLy Linux - Software 6 10-09-2016 09:54 PM
ngrep before iptables or iptables before ngrep szejiekoh Linux - Networking 3 03-12-2015 10:00 AM
how to install ngrep package? mr_scary Red Hat 2 08-30-2006 01:24 PM
ngrep questions fakie_flip Linux - Security 4 08-19-2006 07:31 AM
ngrep usage sailu_mvn Linux - Networking 0 01-16-2006 11:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration