Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a dedicated server running Ubuntu 10.04.

Trying to access a certain URL (HTTP-based API service) results in timeouts. I tried curl, wget and others.

It was working OK until recently. I can access the URL from my local machine and other servers.

Although it looks like API provider may have blocked inbound requests from my server, it is very unlikely because the API was used very ocassionally.

What are the best ways to debug it? What places can I check to see if it is not my server or network blocking this outbound request?

share|improve this question

One of the things to try is to sniff the traffic leaving your PC (and your router if you have a Linux router). You can do this with tcpdump. For example, if the IP address of the site you are going to is "", the protocol is HTTP and your Internet connection is on eth0, you could try (as root)

tcpdump -n -i eth0 src or dst and port 80

and then going to the URL to check to get an idea if packets are coming in and out of your box. If you are seeing packets in both directions you can try

tcpdump -A -s 1500 -n -i eth0 src or dst and port 80 | tee hit.dump

To get a dump of the traffic entering and leaving your box (or network).

If TCPDump shows packes leaving but not entering your network, you should double-check your iptables rules (but these are unlikely to be a problem). You can list these with

/sbin/iptables -vnL

and inspecting the output.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .