# Ports blocked (Hetzner cloud server)

**URL:** https://meta.discourse.org/t/ports-blocked-hetzner-cloud-server/225146
**Category:** Self-hosting
**Created:** [April 24, 2022, 10:58am UTC](https://meta.discourse.org/t/ports-blocked-hetzner-cloud-server/225146 "2022-04-24T10:58:22Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![Paketbote](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@Paketbote](https://meta.discourse.org/u/Paketbote)
#### Post date: [April 24, 2022, 10:58am UTC](https://meta.discourse.org/t/ports-blocked-hetzner-cloud-server/225146/1 "2022-04-24T10:58:22Z")

</div>

Hi,

I’m trying to install Discourse on a cloud server from Hetzner but when running `./discourse-setup` I get the message that ports are blocked ([domain.de](http://domain.de) is obviously not the real domain):

```plaintext
WARNING: Port 443 of computer does not appear to be accessible using hostname: discourse.domain.de.
WARNING: Connection to http://discourse.domain.de (port 80) also fails.

```

As suggested from the setup tool I now want to check if [discourse.domain.de](http://discourse.domain.de) resolves to the IP address of the cloud server. When I do `dig discourse.domain.de` I get the following output:

```plaintext
; <<>> DiG 9.16.1-Ubuntu <<>> discourse.domain.de
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28839
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;discourse.domain.de.	IN	A

;; ANSWER SECTION:
discourse.domain.de. 4134	IN	A	XXX.XXX.XXX.XXX (correct ip address)

;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Sun Apr 24 10:14:44 UTC 2022
;; MSG SIZE rcvd: 70

```

Which seems good to me.  
The next thing that is suggested is that it could be a firewall issue. I have a firewall with the following ports open:

 ![firewall](https://global.discourse-cdn.com/meta/original/4X/2/4/0/240c5a6ddc30b79541d698da530cd7ccb70c7fb8.png)  
So I think the firewall is not the reason for the message above. Is it possible that there is something else that is blocking the ports? I’ve read that Apache could cause such a problem but it is not installed on the cloud server.  
I tried `telnet discourse.domain.de 443` to see if the ports are open and I got

```plaintext
telnet: Unable to connect to remote host: Network is unreachable

```

Does anyone have an idea how to fix this problem?  
Thank you!

EDIT: It’s the same with deactivated firewall.

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [April 24, 2022, 11:29am UTC](https://meta.discourse.org/t/ports-blocked-hetzner-cloud-server/225146/2 "2022-04-24T11:29:33Z")

</div>

Have you looked up the DNS using an external service?

Ie. One that is not routing through your cloud host provider?

> **[DNS Lookup Tool – Check DNS Records and Nameservers](https://www.nslookup.io/)**
>
> Explore fast and reliable DNS lookup tools, domain information, and essential network utilities all in one place on NSLookup.io.

---

<div class="post-metadata">

### Author: ![Paketbote](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@Paketbote](https://meta.discourse.org/u/Paketbote)
#### Post date: [April 24, 2022, 11:53am UTC](https://meta.discourse.org/t/ports-blocked-hetzner-cloud-server/225146/3 "2022-04-24T11:53:34Z")

</div>

I have not done that before, thanks for the tip. It shows the correct IPv4 address.

---

<div class="post-metadata">

### Author: ![michaeld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaeld/32/1594_2.png) [@michaeld](https://meta.discourse.org/u/michaeld)
#### Post date: [April 24, 2022, 9:48pm UTC](https://meta.discourse.org/t/ports-blocked-hetzner-cloud-server/225146/4 "2022-04-24T21:48:02Z")

</div>

You are getting that message because those ports _are_ being blocked by Hetzner.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [April 25, 2022, 7:57am UTC](https://meta.discourse.org/t/ports-blocked-hetzner-cloud-server/225146/5 "2022-04-25T07:57:57Z")

</div>

Somehow off topic but do you know why Hetzner would block such important and yet trivial ports?

---

<div class="post-metadata">

### Author: ![Paketbote](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@Paketbote](https://meta.discourse.org/u/Paketbote)
#### Post date: [April 25, 2022, 8:05am UTC](https://meta.discourse.org/t/ports-blocked-hetzner-cloud-server/225146/6 "2022-04-25T08:05:59Z")

</div>

Okay, thank you. I will contact the support of Hetzner.

---

<div class="post-metadata">

### Author: ![michaeld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaeld/32/1594_2.png) [@michaeld](https://meta.discourse.org/u/michaeld)
#### Post date: [April 25, 2022, 8:24am UTC](https://meta.discourse.org/t/ports-blocked-hetzner-cloud-server/225146/7 "2022-04-25T08:24:24Z")

</div>

To avoid abuse. [https://docs.hetzner.com/cloud/servers/faq/](https://docs.hetzner.com/cloud/servers/faq/)

> Unfortunately, email spammers and scammers like to use cloud hosting providers. And we at Hetzner naturally want to prevent this. That’s why we block ports 25 and 465 by default on all cloud servers. This is a very common practice in the cloud hosting industry because it prevents abuse. We want to build trust with our new customers before we unblock these mail ports. Once you have been with us for a month and paid your first invoice, you can create a [limit request](https://console.hetzner.cloud/limits) to unblock these ports for a valid use case. In your request, you can tell us details about your use case. We make decisions on a case-by-case basis.
> 
> As an alternative, you can also use port 587 to send emails via external mail delivery services. Port 587 is not blocked and can be used without sending a limit request.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [April 25, 2022, 9:51am UTC](https://meta.discourse.org/t/ports-blocked-hetzner-cloud-server/225146/8 "2022-04-25T09:51:52Z")

</div>

That is common solution and one reason why self hosted email server is close to impossíble.

But OP had issues with ports 80 and 443. Or did I miss something?

---

<div class="post-metadata">

### Author: ![michaeld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaeld/32/1594_2.png) [@michaeld](https://meta.discourse.org/u/michaeld)
#### Post date: [April 25, 2022, 10:46am UTC](https://meta.discourse.org/t/ports-blocked-hetzner-cloud-server/225146/9 "2022-04-25T10:46:03Z")

</div>

You are right. I mixed up two different issues. Apologies for the confusion.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [April 25, 2022, 11:08am UTC](https://meta.discourse.org/t/ports-blocked-hetzner-cloud-server/225146/10 "2022-04-25T11:08:38Z")

</div>

I’ve had a forum search to see if anyone else had encountered a similar issue and found this, though unfortunately not a ‘true solution’ as such:

> [@Hetzner experiences](https://meta.discourse.org/t/hetzner-experiences/54430/24):
>
> There was one new issue that I discovered – the **discourse-setup** failed on error message which suggested that **port 443 would be unreachable**. This was on a clean default configuration, with no firewall rules defined. I did not find an obvious reason why this occurs, going though the relevant topics here, disabled CloudFlare caching, but the issue persisted.
> 
> Then I just configured the app.yml manually and it worked perfectely, with Let’s Encrypt, https:// and everything.

Could configuring the app.yml manually be an option for you?

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [April 25, 2022, 11:17am UTC](https://meta.discourse.org/t/ports-blocked-hetzner-cloud-server/225146/11 "2022-04-25T11:17:05Z")

</div>

I’m still confused, but at Digital Ocean firewall must be set up. Clean install doesn’t have any ports open (except for SSH but that is dfferent thing). I don’t know how Hetzner works. And if VPS is behind closed ports, it doesn’t matter what we have on app.yml.

Or am I again missing something?

---

<div class="post-metadata">

### Author: ![Paketbote](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@Paketbote](https://meta.discourse.org/u/Paketbote)
#### Post date: [April 25, 2022, 11:53am UTC](https://meta.discourse.org/t/ports-blocked-hetzner-cloud-server/225146/12 "2022-04-25T11:53:45Z")

</div>

Manual configuration of app.yml is the solution to the problem for me as well. Thanks!  
I also found this thread, but I guess I didn’t read it carefully enough… 🙈

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [April 25, 2022, 12:49pm UTC](https://meta.discourse.org/t/ports-blocked-hetzner-cloud-server/225146/13 "2022-04-25T12:49:48Z")

</div>

I host three forums on Hetzner and I didn’t encounter this issue ever 🤔

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [April 25, 2022, 1:16pm UTC](https://meta.discourse.org/t/ports-blocked-hetzner-cloud-server/225146/14 "2022-04-25T13:16:57Z")

</div>

So Hetzner will open ports for web-server when there is just started VPS? Or do they install nginx or apache as default?

That’s… strange.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [April 25, 2022, 2:08pm UTC](https://meta.discourse.org/t/ports-blocked-hetzner-cloud-server/225146/15 "2022-04-25T14:08:21Z")

</div>

> [@Jagster](#):
>
> So Hetzner will open ports for web-server when there is just started VPS?

I think so. When I start a VPS (Ubuntu 20), ~~nginx isn’t installed by default: discourse-setup installs it.~~  
I’ve installed Discourse numerous times on Hetzner VPS without any problem for years (the last time was in February).  
That’s why I’m puzzled about this topic.

* * *

edit: for some reasons my brain mixed up docker and nginx 😅

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [April 26, 2022, 1:11pm UTC](https://meta.discourse.org/t/ports-blocked-hetzner-cloud-server/225146/16 "2022-04-26T13:11:42Z")

</div>

> [@Canapin](#):
>
> When I start a VPS (Ubuntu 20), nginx isn’t installed by default: discourse-setup installs it.

That’s not quite true. It doesn’t install nginx on the OS, but the Discourse docker container includes it.

> [@Jagster](#):
>
> at Digital Ocean firewall must be set up. Clean install doesn’t have any ports open (except for SSH but that is dfferent thing). I

That’s not my experience. The default Ubuntu LTS does not include a firewall and all ports are open.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [April 26, 2022, 7:36pm UTC](https://meta.discourse.org/t/ports-blocked-hetzner-cloud-server/225146/17 "2022-04-26T19:36:57Z")

</div>

> [@pfaffman](#):
>
> The default Ubuntu LTS does not include a firewall and all ports are open.

There is two options: using firewall by Digital Ocean or installing UFW (or similar) after creation of VPS. Any of my installations don’t use theirs so all ports are closed until I open them from UFW.

Anyway — now I/we know when, where and how Nginx is installed. Every day something new (when you/I/someone don’t understand how docker works 😄 )

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [May 26, 2022, 7:37pm UTC](https://meta.discourse.org/t/ports-blocked-hetzner-cloud-server/225146/18 "2022-05-26T19:37:23Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
