Server Fault is a question and answer site for system and network administrators. 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 cannot access a certain website in my Linux Server.

# curl
curl: (7) couldn't connect to host

It's accessible from anywhere else but my server. I disabled ConfigServer Firewall but the problem still persist. I have no idea how I can investigate the issue and realize why this page is not accessible in my server?

I would appreciate any comment.

share|improve this question
  • Is this URL password protected, if so you'll need to pass that info.
  • Does the server have a valid SSL certificate, if not you'll need to use the -k option.
  • Use the -v option to get verbose output
  • Try using wget with the same URL and see if that works.
  • Can you ping that server?
  • Can you traceroute that server?

It's possible that server has blocked you on their side. Only thing you can do in that case is contact the administrator for that system. I can't access it from my system, so it's not just your system. May be restricted to certain networks/hosts.


  • Name or service not known == DNS problem.
  • Can you ping the IP address?
  • Try disabling your firewall temporarily to see if it is causing a problem.
share|improve this answer
1) URL is not password protected 2) Yes, server has valid SSL certificate. 3) "Trying Connection timed out" 4) "wget" did not work too. 5) I cannot ping the server 6) Traceroute: " Name or service not known" – bman Sep 25 '11 at 6:44
Name service not known = DNS/resolver problem. – Mircea Vutcovici Sep 25 '11 at 6:51
See updated answer – Andrew Case Sep 25 '11 at 7:00

The error

curl: (7) couldn't connect to host

means that the DNS is working fine, but the TCP connection failed. This is a networking issue at TCP level. Check the firewall and may be your MTU. If you have a bad firewall that filters all ICMP, then you might have problem if there is a lower MTU on the path that is smaller that the one from the local machine.

To disable certificate checking use:

curl -k
share|improve this answer
For me it is working with curl Try with http instead https. – Mircea Vutcovici Sep 25 '11 at 8:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.