0

I've got a Fedora LAMP server on Amazon EC2 functioning as a HTTP pseudo-proxy (Sorry, don't know the terminology- It's not a true proxy where requests are relayed through apache, rather client requests are being translated by a PHP script, which then sends a new request.)

I'd like to be able to fully log the HTTP cycle

  1. CLIENT -> PROXY
  2. PROXY -> SERVICE
  3. SERVICE -> PROXY
  4. PROXY -> CLIENT

I'm hoping to do this using BASH tools- thinking netcat? Looking for advice and examples. Thanks!

Yarin
  • 1,366
  • 8
  • 19
  • 31

1 Answers1

1

If I understand your question correctly, I'd use both netcat and tcpdump. tcdump is a *nix tool that dumps the traffic on a network. You can specify things like the NIC you want to dump, the protocol or the source/destination ips.

It's very useful when debugging or troubleshooting networking problems.

More info about tcpdump here and some good examples here.

Marco Ramos
  • 3,120
  • 23
  • 25
  • Thanks Marcos- How do the two compare? When would you use one over the other? Also, have you used Ethereal, or any other tcpdump guis? – Yarin May 27 '10 at 12:26
  • @Yarin: in this specific case I'd use tcpdump. And yes, I've used Ethereal and it's great as a Tcpdump GUI (the best, imho :)) – Marco Ramos May 27 '10 at 12:57