Hello, I facing the following problem Code: root@srv:~# curl -I -- https://www.mydomain.tld curl: (7) Failed to connect to www.mydomain.tld port 443: Connection refused The port 443 is open. Any help?
You can ping www.mydomain.tld to see what ip addr(s) that "srv" host would be trying to connect to, then see if the host has a web server listening on port 443, and check all firewalls and any nat/router/port forwards between the client and the server. If "srv" happens to be the server hosting that site and you are behind a NAT, it could simply be that curl is contacting the public ip address and your router/NAT doesn't forward the connection (search for "hairpin nat" for your router model).
Yes, everything else that I posted. Also note that you may have a host firewall and a network firewall involved.
I'm not a network guru (Mikrotik) I tried some solutions that i finded to internet with no luck. I discovered that is not only 443 that rejected. Seems server doesn't see its own domain (80). I am Still searching for solution. Code: root@srv:~# wget http://domain.tld --2021-09-30 19:03:15-- http://domain.tld/ Resolving domain.tld (domain.tld)... 6x.xx.xx.xx Connecting to mydomain.tld (mydomain.tld)|6x.xx.xx.xx|:80... failed: Connection refused.
well, it's working right now. wget diavgia.gr --2021-10-01 16:23:40-- http://diavgia.gr/ Resolving diavgia.gr (diavgia.gr)... 62.74.247.2 Connecting to diavgia.gr (diavgia.gr)|62.74.247.2|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: http://www.diavgia.gr/ [following] --2021-10-01 16:23:41-- http://www.diavgia.gr/ Resolving www.diavgia.gr (www.diavgia.gr)... 62.74.247.2 Reusing existing connection to diavgia.gr:80. HTTP request sent, awaiting response... 301 Moved Permanently Location: https://www.diavgia.gr/ [following] --2021-10-01 16:23:41-- https://www.diavgia.gr/ Connecting to www.diavgia.gr (www.diavgia.gr)|62.74.247.2|:443... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] Saving to: ‘index.html.3’ index.html.3 [ <=> 155.37K 681KB/s in 0.2s
not from my own server root@srv:~# wget mydomain/tld --2021-10-01 18:33:51-- http://mydomain/tld Resolving my domain(mydomain)... failed: Name or service not known. wget: unable to resolve host address ‘mydomain.tld’ root@srv:~# wget mydomain.tld --2021-10-01 18:33:55-- http://mydomain.tld/ Resolving mydomain.tld (mydomain.tld)... 6x.xx.xx.xx Connecting to mydomain.tld (mydomain.tld)|6x.xx.xx.x|:80... failed: Connection refused. root@srv:~#
ok forget that, didn't pay close attention to the 2nd half of your post is that ip actually local to that server? or on a firewall/lb/router in front of the server? any firewall rules in place? have you tried connecting to it from another server on the same subnet?
Code: root@srv:~# wget http://mydomain.tld --2021-10-01 18:58:38-- http://mydomain.tld/ Resolving mydomain.tldr (mydomain.tld)... 6x.xx.xxx.x Connecting to mydomain.tld (mydomain.tld)|xx.xx.xx.xx|:80... failed: Connection refused.
Repeating from earlier: Ie. you need to setup your router to forward the connection for your internal hosts; search for your specific router model/software to find how to do that.