# Certbot not using port

**URL:** <https://community.letsencrypt.org/t/certbot-not-using-port/205274>\
**Category:** Help\
**Created:** [September 17, 2023, 7:57am UTC](https://community.letsencrypt.org/t/certbot-not-using-port/205274 "2023-09-17T07:57:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Idkan](https://avatars.discourse-cdn.com/v4/letter/i/ea5d25/32.png) [@Idkan](https://community.letsencrypt.org/u/Idkan)\
**Post date:** [September 17, 2023, 7:57am UTC](https://community.letsencrypt.org/t/certbot-not-using-port/205274/1 "2023-09-17T07:57:19Z")

</div>

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. [crt.sh | example.com](https://crt.sh/?q=example.com)), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: [portc.3bbddns.com](http://portc.3bbddns.com)

I ran this command: sudo certbot certonly --manual --http-01-port 47810

It produced this output: Domain: [portc.3bbddns.com](http://portc.3bbddns.com)  
Type: connection  
Detail: 110.164.204.27: Fetching [http://portc.3bbddns.com/.well-known/acme-challenge/V2CabgUSz1B1wdSolYbLBtuB6QwPEW6KNsQumXYB0kc:](http://portc.3bbddns.com/.well-known/acme-challenge/V2CabgUSz1B1wdSolYbLBtuB6QwPEW6KNsQumXYB0kc:) Timeout during connect (likely firewall problem)

My web server is (include version): nginx 1.18.0

The operating system my web server runs on is (include version): ubuntu 22.04 lts

My hosting provider, if applicable, is: non

I can login to a root shell on my machine (yes or no, or I don't know): yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): no

The version of my client is (e.g. output of `certbot --version` or `certbot-auto --version` if you're using Certbot): 1.21.0

usually how i would access the server is [portc.3bbddns.com:47810](http://portc.3bbddns.com:47810) and [http://portc.3bbddns.com:47810/.well-known/acme-challenge/V2CabgUSz1B1wdSolYbLBtuB6QwPEW6KNsQumXYB0kc](http://portc.3bbddns.com:47810/.well-known/acme-challenge/V2CabgUSz1B1wdSolYbLBtuB6QwPEW6KNsQumXYB0kc) show the token fine, im guessing cerbot didnt use [portc.3bbddns.com:47810](http://portc.3bbddns.com:47810) and use [portc.3bbddns.com](http://portc.3bbddns.com) instead

---

<div class="post-metadata">

**Author:** ![Nekit](https://avatars.discourse-cdn.com/v4/letter/n/7feea3/32.png) [@Nekit](https://community.letsencrypt.org/u/Nekit)\
**Post date:** [September 17, 2023, 8:09am UTC](https://community.letsencrypt.org/t/certbot-not-using-port/205274/2 "2023-09-17T08:09:24Z")

</div>

> The HTTP-01 challenge can only be done on port 80. Allowing clients to specify arbitrary ports would make the challenge less secure, and so it is not allowed by the ACME standard.

— [HTTP-01 challenge](https://letsencrypt.org/docs/challenge-types/#http-01-challenge)

`--http-01-port` option exists to be able to port-forward/reverse-proxy 80→`<specified_port>`

---

<div class="post-metadata">

**Author:** ![Idkan](https://avatars.discourse-cdn.com/v4/letter/i/ea5d25/32.png) [@Idkan](https://community.letsencrypt.org/u/Idkan)\
**Post date:** [September 17, 2023, 8:22am UTC](https://community.letsencrypt.org/t/certbot-not-using-port/205274/3 "2023-09-17T08:22:10Z")

</div>

oh then how do i use TLS-ALPN-01 since my ddns is provided by my isp and gave me port 47810 to 47819 to work with and i cant change them, also it only redirect http request to my router so theres no option to add a dns record

---

<div class="post-metadata">

**Author:** ![Osiris](https://avatars.discourse-cdn.com/v4/letter/o/839c29/32.png) [@Osiris](https://community.letsencrypt.org/u/Osiris)\
**Post date:** [September 17, 2023, 8:23am UTC](https://community.letsencrypt.org/t/certbot-not-using-port/205274/4 "2023-09-17T08:23:40Z")

</div>

Certbot does not have `tls-alpn-01` capabilities, only `http-01` and `dns-01`. There are other ACME clients which do have `tls-alpn-01` support.

Note that `tls-alpn-01` requires port 443 to be accessible.

Also note that the ACME client might influence the challenge used, but it's up to the ACME _server_ to do the validation. Not Certbot or any other ACME client. ACME clients cannot influence the details of a challenge, such as the port used to connect to.

---

<div class="post-metadata">

**Author:** ![9peppe](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/9peppe/32/31596_2.png) [@9peppe](https://community.letsencrypt.org/u/9peppe)\
**Post date:** [September 17, 2023, 12:19pm UTC](https://community.letsencrypt.org/t/certbot-not-using-port/205274/5 "2023-09-17T12:19:20Z")

</div>

> [@Idkan](#):
>
> my isp and gave me port 47810 to 47819 to work with and i cant change them

I guess that only happens on IPv4. Does your ISP support IPv6?

---

<div class="post-metadata">

**Author:** ![linkp](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/linkp/32/60089_2.png) [@linkp](https://community.letsencrypt.org/u/linkp)\
**Post date:** [September 17, 2023, 2:44pm UTC](https://community.letsencrypt.org/t/certbot-not-using-port/205274/6 "2023-09-17T14:44:11Z")

</div>

You may want to use the DNS-01 challenge method.

---

<div class="post-metadata">

**Author:** ![rg305](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rg305/32/91314_2.png) [@rg305](https://community.letsencrypt.org/u/rg305)\
**Post date:** [September 17, 2023, 4:33pm UTC](https://community.letsencrypt.org/t/certbot-not-using-port/205274/7 "2023-09-17T16:33:10Z")

</div>

Can you use another ISP?

---

<div class="post-metadata">

**Author:** ![linkp](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/linkp/32/60089_2.png) [@linkp](https://community.letsencrypt.org/u/linkp)\
**Post date:** [September 17, 2023, 5:42pm UTC](https://community.letsencrypt.org/t/certbot-not-using-port/205274/8 "2023-09-17T17:42:57Z")

</div>

While this is going to be leaning off topic for deep discussion here, it is worth mentioning that Cloudflare now has [Origin Rules](https://developers.cloudflare.com/rules/origin-rules/) that allow you to map to non-standard ports on your origin server. You can discuss this in the [Cloudflare Community](https://community.cloudflare.com/) if you think it might be useful. DNS-01 challenges are reasonably straightforward on Cloudflare as well.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [October 17, 2023, 5:43pm UTC](https://community.letsencrypt.org/t/certbot-not-using-port/205274/9 "2023-10-17T17:43:24Z")

</div>

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