port 443: connection refused

Discussion in 'General' started by vassilis3, Aug 5, 2021.

  1. vassilis3

    vassilis3 Member

    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?
     
  2. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    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).
     
    ahrasis likes this.
  3. vassilis3

    vassilis3 Member

    Hello,
    Seems not firewall problem I disable firewall and the problem persist.
    Any other idea?
     
  4. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Yes, everything else that I posted. Also note that you may have a host firewall and a network firewall involved.
     
  5. vassilis3

    vassilis3 Member

    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.
    
     
    Last edited: Oct 1, 2021
  6. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    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
     
  7. vassilis3

    vassilis3 Member

    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:~#
     
    Last edited: Oct 1, 2021
  8. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

  9. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    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?
     
  10. vassilis3

    vassilis3 Member

    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.
    
     
    Last edited: Oct 1, 2021
  11. vassilis3

    vassilis3 Member

    Yes is behind NAT
    Yes there are firewall same problem when disable it
    nope
     

    Attached Files:

    • mkt1.jpg
      mkt1.jpg
      File size:
      111.7 KB
      Views:
      40
  12. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    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.
     
  13. vassilis3

    vassilis3 Member

    I have already made port forwarding
     

    Attached Files:

    Last edited: Oct 1, 2021

Share This Page