1

I cannot access a certain website in my Linux Server.

# curl https://pgws.bpm.bankmellat.ir/pgwchannel/services/pgw?WSDL
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.

2 Answers 2

2
  • 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.

[edit]

  • 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.
3
  • 1) URL is not password protected 2) Yes, server has valid SSL certificate. 3) "Trying 79.170.146.134... Connection timed out" 4) "wget" did not work too. 5) I cannot ping the server 6) Traceroute: "pgws.bpm.bankmellat.ir: Name or service not known"
    – bman
    Sep 25, 2011 at 6:44
  • 1
    Name service not known = DNS/resolver problem. Sep 25, 2011 at 6:51
  • See updated answer Sep 25, 2011 at 7:00
0

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 https://pgws.bpm.bankmellat.ir/pgwchannel/services/pgw?WSDL
1
  • 1
    For me it is working with curl http://pgws.bpm.bankmellat.ir/pgwchannel/services/pgw?WSDL. Try with http instead https. Sep 25, 2011 at 8:06

You must log in to answer this question.

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