General :: Utility To Execute HTTP Requests And Examine Raw Responses
Jul 24, 2010
I'm learning about the HTTP protocol and I'd like to know if there's a tool I can use to input a HTTP request I have created myself that will output the raw response. I've had a look at cURL and wget but they don't seem to have an obvious option to do this. For example:
Back in April I set up a Ubuntu DHCP server and a multiple VLAN network [URL] to migrate our various servers, workstations, etc off the 192.168.1.1 /24 network that everything was on because we where running out of address space. I built out the new network and everything worked great except our AD server would never get an IP address from the DHCP server (static reservation) and even if I set the IP statically on the AD server it couldn't ping the gateway and noone could log in. After several attempts to resolve this, including bringing in outside help, we where never able to figure out what the problem was.
Now 6 months later I have time to revisit the issue without effecting the live network. I used Acronis and imaged the AD server last Friday, cloned it on to another box with the same hardware, and put it up on the new network that's been sitting unused for the last 6 months. Today when I statically set the IP on the AD server (which is what I want) it connects and I can ping it's gateway 192.168.1.1 and all the way across vlans to a test sales agent workstation at 192.168.8.xxx on vlan 800 but only if I statically assign the agents station an IP address. When I try to get an IP address via DHCP it fails as destination unreachable. Nothing has changed in the last 6 months on the DHCP server but now it for some reason can't ping its default gateway 192.168.1.1. All of the config files are the same as they where left from the post linked above aside from the vlan id's used where changed from 1's to 100's (i.e. vlan 3 is now vlan 300) /etc/network/interfaces
Code:
auto lo iface lo inet loopback auto vlan100 iface vlan100 inet static
[code]....
why it can't reach the gateway, when I do a tcpdump I can see the DHCP requests come in on eth0 but the server never responds and I'm pretty sure its because it isn't "seeing" them since it thinks there isn't a network connection but I don't know how to trouble shoot to find out where the problem lies.
I have a server (Fedora 12) setup at a client's datacenter and the network is setup to allow me ssh access into the server, but prevents me from opening any connections from the server. However, I need to make http and https request from the server. What I'd like to do is forward all http/https traffic through another machine outside the network.
I've been looking at the documentation for ssh and the various options there and have gotten so far as to enable initiating an ssh connection from the client network back to my machine, but am not sure where to take it from there.
Here are some of the commands I've used so far:
Code:
I'm attempting to bind port 80 to be forwarded through the local machine. I assume I use "ssh -R" to create a dynamic tunnel to forward requests but I must be missing something.
My computer shares an internet connection using an ADSL router.There are other three machines.I have set up a Apache server for learning purpose and I want it to be inaccessible from anywhere else including the PCs in the network.When I enter my ip-address assigned in the network (192.168.1.1xx) from other computer,I get my ppages and I dont want that.
How can I block HTTP requests from other computers?
We have a cisco ASA firewall at work,which redirects all http traffic to our webserver. We have to install a new website ,but it can't be installed to the same server. Setting up a squid reverse proxy can redirect the incoming http requests to the appropriate webserver? If yes, could I get some directions on howto?
I've had a VPS running Ubuntu 9.10 x64 server, hosting 3 websites of mine for a few months now. This problem has been happening for a while. Every once in a while, probably every 2 or 3 days, I'll wake up in the morning, and apache won't be responding, no web pages will load. /etc/init.d/apache2 status, reports that apache is functioning properly. Every time I simply have to restart the daemon and things run fine for another few days.
I thought maybe it was a memory issue, so I lowered the MaxClients in the prefork module from 50 to 30 a few days ago, but the same thing is still happening. My VPS has 512MB of ram, burstable to 1GB, and according to Virtuozzo, there was only one night of high traffic where I even came close to that soft limit. I've checked my syslog, and there's absolutely nothing in there about apache. I've checked apache's error.log as well, and there's nothing in there that would indicate a problem either.
For one project I use a web hosting service. I wanted the entire site to be https, so I bought a service from them in which they automatically install a trusted cert so people can access the site through https protocol. Since http is still available, though, I need to do automatic rewrites or something to change http into https requests. (I don't have access to their Apache server configuration files or anything like that.)I found on the net this code to add to my .htaccess file:
Code: RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
A Linux (CentOS5.3) server is setup with apache reverse proxy. The reverse proxy server is opened to outside and an internal server is mapped to ProxyPass configuration. SSL certificate is also installed on the Apache reverse proxy server. The problem is, it is extremely slow in serving http requests through reverse proxy. There is no problem with server resources or bandwidth. When the internal server is directly accessed through Internet, there is no delay. The backend server and the reverse proxy server are also on the same switch (same subnet). When I searched the Net, there were recommendations to enable cache in Apache. I did so as follows in httpd.conf.
But still there is no progress. Do I want to enable cache in ssl.conf too? Or is there any other workaround to speed up Apache reverse proxy. Is there a way to check that caching is happening?
Is there a driver or utility to mount an iso image over http or https? There is a httpDisk driver for windows but I can't find anything similar for Linux.
There may be a way of using curl/wget but not sure if this is possible.
Squid document says that Squid accepts only HTTP requests but speaks FTP on the server side when FTP object are requested.
We call Squid HTTP and FTP caching proxy server. Does it also caches FTP contents? Is it possible to configure FTP clients to use Squid cache? When we make an FTP request to an FTP site via Squid will it be bypassed?
I would like to execute an already written C program that I am running on my embedded Linux, but from afar - through a HTML page. I am running an embedded Linux on my FPGA prototype board with a MicroBlaze soft processor. On this Linux i am running a httpd web server - I can serve html web pages to the outside through Ethernet connection. Now, I have a program written in C in this embedded Linux in /bin/gpio-test that does some stuff with my IO devices. Now I would like to control these IO devices through HTML web page - so I would like to be able to run this gpio-test program from a html web page and possibly send the program some parameters.
This one is really busting my balloons. I have been running my new machine for a couple of weeks now. I have either beaten most issues into submission or come up with work arounds or just learned to live with them. Except for this one...
About once a day, I cannot duplicate the circumstances, my Alt key ceases to function in Ubuntu. My left hand has over the years evolved into a specialized tool which presses Alt-Tab and Alt-F4 instinctively. When these do not work it is driving me nuts.
I have determined that this is not a hardware issue. I generally have a VMWare virtual machine running and Alt-Tab and other Alt key combinations work in the VM at the same time as they are not working on the host.
I must at a minimum logout and back in get the Alt key to be recognized again in the host.
Is there a tool which I can run to examine the key strokes as they are typed? something like the keyboard tester which runs during installation?
running Ubuntu 10.10 and mozilla and seamonkey... Tried to access a website: [URL] and got the error: The page cannot be displayed You have attempted to execute a CGI, ISAPI, or other executable program from a directory that does not allow programs to be executed. Please try the following: Contact the Web site administrator if you believe this directory should allow execute access. HTTP Error 403.1 - Forbidden: Execute access is denied. Internet Information Services (IIS)
cpuid utility is not compiled with U9.04 and the utility is not available as a package with synaptic - other distributions have it available as rpm . url
Using netcat, nc(1), craft a valid http/1.1 request for getting http headers (not the html file itself!) for the main index page of www dot aalto dot fi. What request method did you use? Which headers did you need to send to the server? What was the status code for the request? Which headers did the server return? Explain the purpose of each header.
nc -v www dot aalto dot fi 8080 HEAD / HTML/1.1 host: www dot aalto dot fi And it returns: 200 OK Content-Length: 858 Content-Type: text/html Last-Modified: Thu, 02 Sep 2010 12:46:01 GMT [Code]....
I really don't know what does it mean. Question 2: Using netcat, nc(1), start a bogus web server listening on the loopback interface port 8080. Verify with netstat(, that the server really is listening where it should be. Direct your browser to the bogus server and capture the User-Agent: header "Direct your browser to the bogus server and capture the User-Agent: header" I don't understand this question.
I installed Nagios on my Ubuntu 10.04 server using apt-get and when I accessed the web console, everything was OK. I made some changes to apache (creating some new virtual sites) and since then Nagios gives me a warning message for HTTP with the message, HTTP WARNING: HTTP/1.1 404 Not Found. The sites that I created are working perfectly. I noticed that the attemps are 4/4. Does this need to be reset or does Nagios automatically reset that once it detects the issue is resolved?
Our organization has several external IP addresses. I am behind 2 layers of NAT and the servers choose which IP address to route my traffic to. Can I specify which IP address to use when finally leaving the organizations network. I know that source routing can be done in IPv4 by adding some options in the header. But can I configure my PC to add these options automatically. I have both a Windows and a Linux Machine.
I am trying to load vmware server. When running vmware-install.pl it asks where to load the bin files. Default is /usr/bin. Cool with me, so I accept then get the error: "There is insufficient disk space available in /usr/bin. Please make at least an additional 5924k available or choose another directory."
Ok, so in my searches, most cases people actually do have a full disk. I have 30gb free. Another post somewhere stated it could be the file system used, so I tried different file systems. Now I am back on etx3. What's odd is when I blow away the OS and reload and try to install VMware again, I get a different number to be "freed" in the error. Choosing another directory only yeilds a different disk space request.
My hard disk is blank now due to some faults I made in installation.I made a USB stick from which can start Fedora 10 livecd image successfully. My USB device is only 2GB, so livecd image is my only choice. Everything is fine in live cd system. but when I try to install system to hard disk, my PC got frozen - no responses from anything. This situation only happens when I set up the partition and began to write image to the hard disk. It happens at about 5 percent of the progress bar every time. It seems I can't install F10 this way.
So I tried another way : using this LiveCD USB Stick, install it in text mode. However, strange thing came up too: when I finished install the system , it tips "reboot". so I pressed "reboot", however it start KDE and then got frozen again. When I restart PC by "reset" button, it tips me can't find OS - insert system disk and press Enter. It's a BIOS message , so I think at least GRUB is not working. But why and how this happens? I set up them correctly without error tips. But now it can't be started. I set GRUB to be installed in MBR during the installation. My hardware is like this : AMD 5000+ black edition , 4GB RAM , ati 3200 video card , 320GB hard disk (sata port).
I have a pretty quick machine, quad core 2.66GHz duo processor, nice ASUS motherboard, high speed memory bus and so on. Basically, this is not a machine that's getting "maxed out" by playing some music.Load averages for the 4 processors according to htop are 1.48, 1.25, 0.85. Looking at the System Monitor CPU history I am seeing an average of perhaps 25% load.
However, when I am in a shell, I am getting a second or longer waits between key presses at times.My only guess as to why is that may be is that the streaming audio is on some very high priority so everything else gets put on the back burner. In any case, does anyone have any experience with this and a possible tweak that would give everything else a "fair go" so things didn't seem so unresponsive?
Several days ago responses to many, but not all, of my internet requests slowed from long to never.I'm on Verizon FIOS; running Firefox on a Debian Lenny system with 6GB or RAM and 500GB HD with 32GB cache.
internettrafficreport.com shows index of 84 for North America. I've pinged a few sites -- see returns from 16ms to 91ms.I've also rebooted my Verizon DSL router.
I'm having a problem with connecting over ssh to a server (wrdsvr) that has me perplexed. I'm using putty to connect from my WIndows VM desktop to a SLES 9 server. If I connect to wrdsvr from my desktop over ssh and run certain commands with multi-line output, the display freezes after the first line. If I connect from my desktop to a different server (oksvr), and then from oksvr I connect to wrdsvr, then there is no problem. In fact, by running 'w' after connecting in that roundabout way I can see that subsequent commands I type into the frozen window still run.
I just can't see anything in the window itself as the display is frozen. I have sshd logging running in debug mode on wrdsvr and there is nothing produced during this. There is also nothing in the putty event log. If I type 'exit' in the frozen window, the server sees the connection as closing normally and then gone. Usually my putty window would then close automatically, but in this frozen case it doesn't. So although it is sending characters I type in, it doesn't seem to be receiving the output in return.
commands that run successfully are: w ls man less
commands that cause the display to freeze are: ps ax ls -l top (for this one I don't even get the first line of output, it freezes immediately)
The machine I'm connecting from is a VMFusion guest running Windows XP. I get this behavior connecting using putty, but I also installed a demo version of securecrt (when this issue occurred previously) which saw the same problem, but I can't repeat it as my license expired. (Last time the issue went away while I was troubleshooting an immediate service-affecting problem on that and a number of other servers and I don't know what fixed it!) I exported the putty registry keys and the profiles for the two servers are identical. I tried loading the profile for oksvr and temporarily changing the hostname to wrdsvr, but saw the same issue. I am connecting over a Cisco VPN.
My colleague is on the local network and does not see this issue when he connects to wrdsvr using putty. We are both using the same version of putty 0.60. Here is the background on the servers. Both wrdsvr and oksvr are running SLES 9. My actions just before I noticed these issues were the following. I updated them using you (yast online update) to the latest patch versions. Using the rpms from Novell, I installed binutils, make, gcc, and glibc-devel and finally VMware tools on both. I then rebooted. Since then I've run you again but that hasn't changed anything. I've compare the installed patches using diff and they are the same. Now I'm working my way through the output of rpm -qVa on each one, but nothing so far.
I'm writing a mass snmp toner check which polls any toners available to be snmp polled, however when using a loop statement I get the results on different lines; which sounds good, however the tool I use to check with (nagios) ignores the new lines.
Is there any way I can get the output on one line? Also, I need to raise a fault if any of the toners are below a specific level (with nagios you raise faults with the exit code) - any way I can do this without exiting the loop. Code below with bits and bobs commented out.