# ActiveGate not working on port 443

**URL:** <https://community.dynatrace.com/t/activegate-not-working-on-port-443/20472>\
**Category:** Open Q&A\
**Tags:** activegate\
**Created:** [April 26, 2019, 9:05am UTC](https://community.dynatrace.com/t/activegate-not-working-on-port-443/20472 "2019-04-26T09:05:09Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![davide\_diana1](https://avatars.discourse-cdn.com/v4/letter/d/e56c9b/32.png) [@davide\_diana1](https://community.dynatrace.com/u/davide_diana1)\
**Post date:** [April 26, 2019, 9:05am UTC](https://community.dynatrace.com/t/activegate-not-working-on-port-443/20472/1 "2019-04-26T09:05:09Z")

</div>

I am trying to configure the ActiveGate listener on port 443. I edited the file:

/var/lib/dynatrace/gateway/config/custom.properties

adding the lines:

[com.compuware.apm.webserver]  
port-ssl = 443

Is there any limitation on this port? I tried to set up others (9997,9998) and they are working fine.

---

<div class="post-metadata">

**Author:** ![Lukasz\_Halman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/lukasz_halman/32/10781_2.png) [@Lukasz\_Halman](https://community.dynatrace.com/u/Lukasz_Halman)\
**Post date:** [April 26, 2019, 9:11am UTC](https://community.dynatrace.com/t/activegate-not-working-on-port-443/20472/2 "2019-04-26T09:11:54Z")

</div>

Port numbers below 1024 require elevated privileges on Linux. AG which runs as regular user is not allowed to open such port.

---

<div class="post-metadata">

**Author:** ![davide\_diana1](https://avatars.discourse-cdn.com/v4/letter/d/e56c9b/32.png) [@davide\_diana1](https://community.dynatrace.com/u/davide_diana1)\
**Post date:** [April 26, 2019, 10:14am UTC](https://community.dynatrace.com/t/activegate-not-working-on-port-443/20472/3 "2019-04-26T10:14:17Z")

</div>

Thank you it makes sense! Is there a way to change the user running the activegate?

---

<div class="post-metadata">

**Author:** ![davide\_diana1](https://avatars.discourse-cdn.com/v4/letter/d/e56c9b/32.png) [@davide\_diana1](https://community.dynatrace.com/u/davide_diana1)\
**Post date:** [April 26, 2019, 10:46am UTC](https://community.dynatrace.com/t/activegate-not-working-on-port-443/20472/4 "2019-04-26T10:46:01Z")

</div>

I tried to run it as root ant it worked. Now I am wondering: Is there a way to expose the 9999 port binding it to the 443? I tired to use “iptables” command but it seems the ruxitagent.config file keeps the 9999 port. Is there a way to “force” the Oneagent to connect using 443?

---

<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:** [April 26, 2019, 8:11pm UTC](https://community.dynatrace.com/t/activegate-not-working-on-port-443/20472/5 "2019-04-26T20:11:37Z")

</div>

Following iptables rule should work, however I guess the advertised port will stil be 9999 as configured at the gateway.

```auto
iptables -t nat -D PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 9999

```

---

<div class="post-metadata">

**Author:** ![davide\_diana1](https://avatars.discourse-cdn.com/v4/letter/d/e56c9b/32.png) [@davide\_diana1](https://community.dynatrace.com/u/davide_diana1)\
**Post date:** [May 3, 2019, 8:35am UTC](https://community.dynatrace.com/t/activegate-not-working-on-port-443/20472/6 "2019-05-03T08:35:30Z")

</div>

Exactly! The issue here is that even if I set up the new routing using IP tables agents keep connecting to 9999. Is there a way to manually set up the 443 on oneagent side?

---

<div class="post-metadata">

**Author:** ![Bert\_VanderHeyd](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/bert_vanderheyd/32/162_2.png) [@Bert\_VanderHeyd](https://community.dynatrace.com/u/Bert_VanderHeyd)\
**Post date:** [May 3, 2019, 11:08am UTC](https://community.dynatrace.com/t/activegate-not-working-on-port-443/20472/7 "2019-05-03T11:08:29Z")

</div>

Yes, in “/opt/dynatrace/oneagent/conf/ruxitagent.conf” (or similar), the list of endpoints is defined.

Server [https://ip-of-the-ag:443/communication](https://ip-of-the-ag:443/communication)

---

<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:** [May 3, 2019, 12:38pm UTC](https://community.dynatrace.com/t/activegate-not-working-on-port-443/20472/8 "2019-05-03T12:38:35Z")

</div>

This will get overwritten as soon as agent connects.  
Actually, the correct method is to set the property in custom.properties as described in the very first post in this thread.  
However, until you run the gateway as root, you cannot bind to ports lower than 1024 anyway.

---

<div class="post-metadata">

**Author:** ![Bert\_VanderHeyd](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/bert_vanderheyd/32/162_2.png) [@Bert\_VanderHeyd](https://community.dynatrace.com/u/Bert_VanderHeyd)\
**Post date:** [May 3, 2019, 1:46pm UTC](https://community.dynatrace.com/t/activegate-not-working-on-port-443/20472/9 "2019-05-03T13:46:58Z")

</div>

I am not referring to the config of the activegate, but to the config of the oneagent. This file “ruxitagent.conf” also states “This file is generated automatically. Please do not modify.” But when it can’t reach any of the configured endpoints, you need to do something. Reinstall of the oneagent also helps (after new download from the dynatrace cluster) as it will use the updated activegate configuration.

I don’t know about this actual use case of moving from port 9999 to 443, but I often use a proxy or loadbalancer to achieve this. The activegate’s port is still 9999 and you use an external gateway to proxy traffic from port 443 to port 9999. Oneagent traffic is all TCP.

---

<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:** [May 3, 2019, 4:36pm UTC](https://community.dynatrace.com/t/activegate-not-working-on-port-443/20472/10 "2019-05-03T16:36:03Z")

</div>

Apart from the PaaS agents where the ruxitagentproc.conf never gets modified - connecting (once) to a predefined endpoint is probably the only use case I can imagine.
