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,507
  • 10
  • 57
  • 85
Mike B
  • 11,871
  • 42
  • 107
  • 168

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,595
  • 1
  • 32
  • 40
2
tcpdump -n -i <INTERFACE> host <IP>

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

vmfarms
  • 3,117
  • 20
  • 17
2

Try this:

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