How to use tcpdump to be able to see http requests sent to the server?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
As you can see it displays part of the nagios URL there... what i'm trying to do is find out what POST/GET/URL nagios executes form the nagios web management when say clicking on the button in nagios that disables notifications for a specific host and service, etc. so unless there is another way to find this out, i'm trying to find the data i need by dumping the packet data. But not sure how i can get all the packet data i need from it. I can see small amount of the request but not all of it?
EDIT:- Well obviously i can see the PHP code page when clicking on the submit button is sending a POST, but i can't see all the entire request?
Last edited by helptonewbie; 01-09-2009 at 07:20 AM.
Well it says right there that it was a POST to that uri... isn't that *exactly* what you want? I think a -v should make it prettier, printing some level of formal decode compared to a dump. In general wireshark is a better option for elegantly pulling stuff like that apart.
I've managed to get more data using the '-s' of tcpdump to not truncate output to 62 bytes as default but to capture whole packet. But this still didn't really give me the exact POST request that was sent. Perhaps i can't do what i want with this method?
Because at the end of the day i want to be able to in a script, run something like:-
curl --connect-timeout 4 --basic -u USER:PASSWORD http://NAGIOS/URL -d 'POST DATA'
To be able to start and stop notifications or checks using the nagios web page but via a script.
Last edited by helptonewbie; 01-09-2009 at 07:40 AM.