# Device Offline Issue with STUN Server Configuration in GenieACS

**URL:** <https://forum.genieacs.com/t/device-offline-issue-with-stun-server-configuration-in-genieacs/6590>\
**Category:** Uncategorized\
**Created:** [February 26, 2025, 8:55pm UTC](https://forum.genieacs.com/t/device-offline-issue-with-stun-server-configuration-in-genieacs/6590 "2025-02-26T20:55:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![VithareshRavi](https://avatars.discourse-cdn.com/v4/letter/v/ac91a4/32.png) [@VithareshRavi](https://forum.genieacs.com/u/VithareshRavi)\
**Post date:** [February 26, 2025, 8:55pm UTC](https://forum.genieacs.com/t/device-offline-issue-with-stun-server-configuration-in-genieacs/6590/1 "2025-02-26T20:55:16Z")

</div>

Hi Team,

**Issue Summary:**

As we attempted to run the STUN server with GenieACS but were unable to bring the device online.

**Investigation and Actions Taken:**

1. **Configuration Updates:**

- Edited the genieacs.env file at /opt/genieacs/genieacs.env
- Added the following entries to configure the UDP connection request port:

ini

```auto
UDP_CONNECTION_REQUEST_PORT=3478  
GENIEACS_UDP_CONNECTION_REQUEST_PORT=3478  

```

1. **STUN/TURN Server Setup:**

- Installed `coturn` to handle STUN/TURN server requirements:

arduino

```auto
apt-get install coturn  
systemctl status coturn  
systemctl start coturn  
systemctl stop coturn  

```

- Configured /etc/turnserver.conf with the following settings:

perl

```auto
listening-port=3478  
tls-listening-port=5349  

fingerprint  
lt-cred-mech  

use-auth-secret  
static-auth-secret=67a95d4e912e6702d6831ab5fbf269978004b2a3fb9b254523dc0b69015d9e79  

realm=turn.example.com  

total-quota=100  
stale-nonce=600  

cert=/etc/letsencrypt/live/turn.example.com/cert.pem  
pkey=/etc/letsencrypt/live/turn.example.com/privkey.pem  
cipher-list="ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384"  

no-sslv3  
no-tlsv1  
no-tlsv1_1  

dh2066  

no-stdout-log  
log-file=/var/tmp/turn.log  

no-loopback-peers  
no-multicast-peers  

proc-user=turnserver  
proc-group=turnserver  

```

1. **GenieACS Configuration:**

- Updated genieacs.env with:

ini

```auto
GENIEACS_STUN_SERVER=<serverIP>:3478  

```

**Error Details:**  
The device remains offline with the following status:  
`<device info>: Device is offline`  
Screenshot attached:

![Screenshot from 2025-02-24 15-19-45.png](https://mail.google.com/mail/u/0?ui=2&ik=505e72066a&attid=0.1&permmsgid=msg-a:r3099801742899309403&th=19537f1a57c34c2f&view=fimg&fur=ip&permmsgid=msg-a:r3099801742899309403&sz=s0-l75-ft&attbid=ANGjdJ8scra8XJh-MrugdENK4yPbxWHlbOIQUKySAh0bwl30aH0wUXJYro3wPOmF_wd73AI16mZfA4kcv8QIBeGnStxhpd_qHHIAU6lYi8x7sOUmooeHT_Kn4BveuSA&disp=emb&realattid=ii_m7j1b6yj0&zw)

**Current Status:**  
Despite these configurations, the device is still offline when connecting to the ACS.

We would appreciate any insights or recommendations to resolve this issue.

---

<div class="post-metadata">

**Author:** ![VithareshRavi](https://avatars.discourse-cdn.com/v4/letter/v/ac91a4/32.png) [@VithareshRavi](https://forum.genieacs.com/u/VithareshRavi)\
**Post date:** [February 28, 2025, 5:54am UTC](https://forum.genieacs.com/t/device-offline-issue-with-stun-server-configuration-in-genieacs/6590/2 "2025-02-28T05:54:15Z")

</div>

Can anyone help me on this?

---

<div class="post-metadata">

**Author:** ![Rocket78](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/rocket78/32/267_2.png) [@Rocket78](https://forum.genieacs.com/u/Rocket78)\
**Post date:** [March 1, 2025, 5:03pm UTC](https://forum.genieacs.com/t/device-offline-issue-with-stun-server-configuration-in-genieacs/6590/3 "2025-03-01T17:03:06Z")

</div>

Struggeling with the same problem as there is little to no documentation how to use STUN properly. I use the 1.2.13 and fiddled together a container for myself with drumsergio’s container and an included stuntman so it’s runnning in the same container. I set the cwmp.udpConnectionRequestPort to 3478 in Admin → Config and I have a populated InternetGatewayDevice.ManagementServer.STUNEnable to true and a populated InternetGatewayDevice.ManagementServer.UDPConnectionRequestAddress with a correct IP and port it got from the STUN server on the CPE.

I enabled debugging for this explicit CPE and I see 3 times this event (masked for privacy):

```auto
event: outgoing UDP message
timestamp: 2025-03-01T16:06:37.114Z
remoteAddress: x.x.x.x
deviceId: 1449BC-Vigor2135FVac-1449BCXXXX
remotePort: 46838
body: "GET http://x.x.x.x:46838?ts=1740845197&id=3247567587&un=acs-cpe&cn=de9839c1ddxxxxxx&sig=6bf0bfd6055358ee1708dce87700e8cc4dxxxxxx HTTP/1.1\r\nHost: x.x.x.x:46838\r\n\r\n"
---

```

Which results in a “No contact from CPE” after the timeout.

I don’t know if it is an CPE- or acs-issue and there is this thread [GenieACS works with STUN](https://forum.genieacs.com/t/genieacs-works-with-stun/6107) which points to acs

---

<div class="post-metadata">

**Author:** ![razametal](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/razametal/32/2229_2.png) [@razametal](https://forum.genieacs.com/u/razametal)\
**Post date:** [April 24, 2025, 2:53am UTC](https://forum.genieacs.com/t/device-offline-issue-with-stun-server-configuration-in-genieacs/6590/4 "2025-04-24T02:53:49Z")

</div>

I’ve the same issue with version 1.2.13. Downgraded to 1.2.9 and devices with STUN works fine.

```auto
 cd /opt/genieacs
 npm install -g genieacs@1.2.9

```
