1

CentOS 5.x

I need to collect a packet capture of https requests going to a specific IP address / virtual interface. Is there a specific switch/parameter for tcpdump that will allow that? The other IPs receive a lot of traffic so I'd prefer to not capture data pertaining to them and have to filter them out later... .

BenMorel
  • 4,215
  • 10
  • 53
  • 81
Mike B
  • 11,570
  • 42
  • 106
  • 165

3 Answers3

6

Try this:

tcpdump -i any dst host your.ip.add.ress and port https

use http instead of https if you want to capture port 80 instead of 443 - or just use the numbers directly if you like. (The http/https names are mapped to the port numbers via lookup in /etc/services)

pjz
  • 10,497
  • 1
  • 31
  • 40
2
tcpdump -n -i <INTERFACE> host <IP>

That should do it. -n will not resolve names.

vmfarms
  • 3,077
  • 19
  • 17
2

Try this:

tcpdump -i any dst host your.ip.add.ress and port 80
wolfgangsz
  • 8,767
  • 3
  • 29
  • 34