# Installing Dynatrace cluster on hardened CIS image (Ubuntu 22.04)

**URL:** <https://community.dynatrace.com/t/installing-dynatrace-cluster-on-hardened-cis-image-ubuntu-22-04/37721>\
**Category:** Dynatrace Managed\
**Tags:** installation, dynatrace-managed\
**Created:** [December 16, 2022, 1:26am UTC](https://community.dynatrace.com/t/installing-dynatrace-cluster-on-hardened-cis-image-ubuntu-22-04/37721 "2022-12-16T01:26:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ardhi](https://avatars.discourse-cdn.com/v4/letter/a/e99b99/32.png) [@Ardhi](https://community.dynatrace.com/u/Ardhi)\
**Post date:** [December 16, 2022, 1:26am UTC](https://community.dynatrace.com/t/installing-dynatrace-cluster-on-hardened-cis-image-ubuntu-22-04/37721/1 "2022-12-16T01:26:40Z")

</div>

Hi,

We’re installing Dynatrace Managed on customer premises but the Nginx service couldn’t listen to port 443.  
From the log, it seems forbidden. We could try to elevate Nginx user privileges but the concern here is the unknown implication (because it’s in the internal steps of dynatrace-managed.sh script).

Right now also Nginx binds to port 8022 and in the Nginx.conf also nowhere to be found the port 443 configurations. Checked with “check” and “status” commands of dynatrace-managed.sh, all services are ok.

We have also pam\_faillock(sudo\_account):unknown option:unlock error during the installation. Not sure if this is related.

Please advise.  
 ![Screenshot 2022-12-16 at 08.24.57.png](https://global.discourse-cdn.com/dynatrace/original/2X/b/beedbdab6498cd68878a34fcbb19c230edbd6575.png)  
 ![Screenshot 2022-12-16 at 08.22.51.png](https://global.discourse-cdn.com/dynatrace/optimized/2X/d/df095eeeeea26fa65488442262c6a03665b233d0_2_690x56.png)  
 ![Screenshot 2022-12-16 at 08.22.34.png](https://global.discourse-cdn.com/dynatrace/optimized/3X/9/9/99900678146df00542b5bd7d0dbadbb387f08e37_2_690x61.png)

---

<div class="post-metadata">

**Author:** ![Radoslaw\_Szulgo](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radoslaw_szulgo/32/1977_2.png) [@Radoslaw\_Szulgo](https://community.dynatrace.com/u/Radoslaw_Szulgo)\
**Post date:** [December 16, 2022, 8:56am UTC](https://community.dynatrace.com/t/installing-dynatrace-cluster-on-hardened-cis-image-ubuntu-22-04/37721/2 "2022-12-16T08:56:21Z")

</div>

Hi&nbsp;[@Ardhi](https://community.dynatrace.com/user/51035)&nbsp;,

You’re struggling to set it up because the “443” port is a “privileged port” in Linux operating systems (pam-related issues)

The TCP/IP port numbers below 1024 are unique because normal users can’t run servers on them. This is a security feature in that if you connect to a service on one of these ports, you can be reasonably sure that you have the real thing and not a fake that some hacker has put up for you.

(source: [https://www.w3.org/Daemon/User/Installation/PrivilegedPorts.html](https://www.w3.org/Daemon/User/Installation/PrivilegedPorts.html))

That’s why by default, in Dynatrace Managed installation, Nginx listens on port :8022, and we have iptables (nftables) rules that redirect the traffic from :443 to :8022. We don’t recommend changing that configuration.

If that’s needed, then:

```auto
setcap 'cap_net_bind_service=+ep' /path/to/dynatrace-managed

```

And then anytime&nbsp;`dynatrace-managed`&nbsp;is executed thereafter, it will have the&nbsp;`CAP_NET_BIND_SERVICE`&nbsp;capability.&nbsp;`setcap`&nbsp;Is in the Debian package&nbsp;`libcap2-bin`.

Now for the caveats - You’ll need at least a 2.6.24 kernel

**Resources:**

- [capabilities(7) man page](http://www.kernel.org/doc/man-pages/online/pages/man7/capabilities.7.html). Read this long and hard if you’re using capabilities in a production environment. There are some really tricky details of how capabilities are inherited across exec() calls that are detailed here.
- [setcap man page](http://man7.org/linux/man-pages/man8/setcap.8.html)
- [“Bind ports below 1024 without root on GNU/Linux”](http://www.wensley.org.uk/info#setpcaps): The document that first pointed me towards&nbsp;`setcap`.

Note:&nbsp;[RHEL first added this in v6](http://www.redhat.com/promo/summit/2010/presentations/summit/whats-next/wed/sgrubb-2-rhel6-security/RHEL6-Security-Overview-2010-Final.pdf). Not sure when Ubuntu has added this.

---

<div class="post-metadata">

**Author:** ![Ardhi](https://avatars.discourse-cdn.com/v4/letter/a/e99b99/32.png) [@Ardhi](https://community.dynatrace.com/u/Ardhi)\
**Post date:** [December 19, 2022, 3:35am UTC](https://community.dynatrace.com/t/installing-dynatrace-cluster-on-hardened-cis-image-ubuntu-22-04/37721/3 "2022-12-19T03:35:53Z")

</div>

![Screenshot 2022-12-19 at 10.34.34.png](https://global.discourse-cdn.com/dynatrace/original/3X/5/5/5520b8f0532ab594dd5995631074497cf6f989cc.png)

Hi&nbsp;[@Radoslaw\_Szulgo](https://community.dynatrace.com/user/25371)&nbsp;,

Thank you for the answer,  
I put the setcap command and reinstalled but still not listening to 443 …  
Just wondering, if is this the case (not listening to 443) when the server is blocked for outbound connection to Dynatrace? I just realized cannot connect to [mcsvc.dynatrace.com](http://mcsvc.dynatrace.com) from the server.

EDIT: can connect to outgoing [mcsvc.dynatrace.com](http://mcsvc.dynatrace.com), so this is not an issue  
 ![Screenshot 2022-12-19 at 13.19.23.png](https://global.discourse-cdn.com/dynatrace/original/2X/3/30885e1cfb7671121a2dada04600fe3017aa18b4.png)

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [December 19, 2022, 7:27am UTC](https://community.dynatrace.com/t/installing-dynatrace-cluster-on-hardened-cis-image-ubuntu-22-04/37721/4 "2022-12-19T07:27:50Z")

</div>

[@Ardhi](https://community.dynatrace.com/user/51035)&nbsp;The NGINX does not listen on the 443/tcp for the reasons above, but there is iptables redirect for that purpose:

```markup
# ss -alt '( sport = 443 )'
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process                 

# ss -alpt '( sport = :8022 )'
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process                 
LISTEN 0 511 0.0.0.0:8022 0.0.0.0:* users:(("nginx",pid=1510320,fd=7),("nginx",pid=1510319,fd=7),("nginx",pid=1510318,fd=7),("nginx",pid=1510317,fd=7),("nginx",pid=1510316,fd=7))

# iptables -t nat -L PREROUTING
Chain PREROUTING (policy ACCEPT)
target prot opt source destination         
REDIRECT tcp -- anywhere anywhere ADDRTYPE match dst-type LOCAL tcp dpt:https redir ports 8022

```

---

<div class="post-metadata">

**Author:** ![Ardhi](https://avatars.discourse-cdn.com/v4/letter/a/e99b99/32.png) [@Ardhi](https://community.dynatrace.com/u/Ardhi)\
**Post date:** [December 19, 2022, 7:58am UTC](https://community.dynatrace.com/t/installing-dynatrace-cluster-on-hardened-cis-image-ubuntu-22-04/37721/5 "2022-12-19T07:58:54Z")

</div>

sorry can you elaborate? are you implying we don’t have to listen to port 443?  
here’s attached

 ![Screenshot 2022-12-19 at 14.55.28.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/8/e8c917d65015c34cd0c2846eb20fc8478c6b3681.png)

my ports  
Because I cannot open https://\<IP &nbsp;address\> / port 443 of the server in the browser

EDIT: now I can access after stopping nftables (checking from CIS list), not sure if this is related

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [December 19, 2022, 8:34am UTC](https://community.dynatrace.com/t/installing-dynatrace-cluster-on-hardened-cis-image-ubuntu-22-04/37721/6 "2022-12-19T08:34:17Z")

</div>

[@Ardhi](https://community.dynatrace.com/user/51035)&nbsp;yes, in your case it seems perfectly fine.

First you should check if you can connect locally to the cluster on the node:

```markup
# curl -v https://localhost -k

```

If this works, then most likely there is a firewall or something else between your browser and the cluster node preventing connections.
