# Nginx - Plex - Remote Access

**URL:** <https://forums.plex.tv/t/nginx-plex-remote-access/667726>\
**Category:** Remote Access\
**Tags:** server-linux\
**Created:** [December 20, 2020, 6:35pm UTC](https://forums.plex.tv/t/nginx-plex-remote-access/667726 "2020-12-20T18:35:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ogret](https://avatars.discourse-cdn.com/v4/letter/o/7ba0ec/32.png) [@ogret](https://forums.plex.tv/u/ogret)\
**Post date:** [December 20, 2020, 6:35pm UTC](https://forums.plex.tv/t/nginx-plex-remote-access/667726/1 "2020-12-20T18:35:07Z")

</div>

Server Version#: 1.12.1.38  
Player Version#:

I hope someone could help me with my issue:

_Firewall Rules:_

Any to Nginx (DMZ 172.16.16.16) port 443 SNAT  
Nginx (DMZ 172.16.16.16) to Plex (LAN 192.168.20.20) port 32400 SNAT

_Nginx Conf_:  
events {  
worker\_connections 1024;  
}

http{  
server {  
listen 80;  
if ($host = nginx.gotdns.ch) {  
return 301 https://$host$request\_uri;  
}  
}

server {  
listen 443 ssl;  
server\_name nginx.gotdns.ch;

#Cert Managed by Certbox  
ssl\_certificate /etc/letsencrypt/live/nginx.gotdns.ch/fullchain.pem; #Managed by Certbot  
ssl\_certificate\_key /etc/letsencrypt/live/nginx.gotdns.ch/privkey.pem; #Managed by Certbot  
include /etc/letsencrypt/options-ssl-nginx.conf; #Managed by Certbot  
ssl\_dhparam /etc/letsencrypt/ssl-dhparams.pem; #Managed by Certbot

```
ssl_stapling on;
ssl_stapling_verify on;

```

location / {  
proxy\_pass [https://192.168.20.20:32400](https://192.168.20.20:32400);  
proxy\_set\_header Host $host;  
proxy\_set\_header X-Real-IP $remote\_addr;  
proxy\_set\_header X-Forwarded-For $proxy\_add\_x\_forwarded\_for;  
}  
}  
}

From Outside i could connect without any issue to my Plex Server and also the redirect is working:  
[https://nginx.gotdns.ch/web/index.html](https://nginx.gotdns.ch/web/index.html)

_Remote Access:_  
**And now my issue**  
the Plex Server told me fully accessible from outside to network and after a few minutes not available outside your network. Your server is signed in to Plex, but is not reachable from outside your network

Private 192.168.20.220 : 32400 178.195.80.80 : 443 Internet

And if I click an retry it works again for a few second or minutes.

Any idea?

---

<div class="post-metadata">

**Author:** ![ogret](https://avatars.discourse-cdn.com/v4/letter/o/7ba0ec/32.png) [@ogret](https://forums.plex.tv/u/ogret)\
**Post date:** [December 22, 2020, 11:59pm UTC](https://forums.plex.tv/t/nginx-plex-remote-access/667726/2 "2020-12-22T23:59:10Z")

</div>

Dec 23, 2020 00:55:14.464 [0x7f32bebe1700] DEBUG - MyPlex: async reachability check - current mapped state: ‘Mapped - Publishing’.  
Dec 23, 2020 00:55:14.464 [0x7f32bebe1700] DEBUG - MyPlex: we already have requested a connectivity refresh for async identifier c1a3adb6-1df8-4fb9-935d-341e967fcaca which has not yet expired.  
Dec 23, 2020 00:55:14.465 [0x7f32bf3e2700] DEBUG - Completed: [192.168.222.81:2275] 200 PUT /myplex/refreshR eachability (15 live) TLS GZIP 0ms 274 bytes (pipelined: 4)  
Dec 23, 2020 00:55:14.513 [0x7f32bfbe3700] DEBUG - EventSource: Got event [data] ‘’  
Dec 23, 2020 00:55:14.513 [0x7f32bfbe3700] DEBUG - PubSub: Got notified of reachability for async identifier c1a3adb6-1df8-4fb9-935d-341e967fcaca: 0 for MyPublicIP:443 (responded in 523 ms)  
Dec 23, 2020 00:55:14.513 [0x7f32bfbe3700] DEBUG - MyPlex: reachability check - current mapping state: ‘Mapp ed - Publishing’.  
Dec 23, 2020 00:55:14.513 [0x7f32bfbe3700] DEBUG - MyPlex: mapping state set to ‘Mapped - Not Published (Not Reachable)’.  
Dec 23, 2020 00:55:14.527 [0x7f32bf3e2700] DEBUG - Request came in with unrecognized domain / IP ‘nginx.gotd ns.ch’ in header Referer; treating as non-local  
Dec 23, 2020 00:55:14.527 [0x7f32bf3e2700] DEBUG - Auth: authenticated user 1 as ogret  
Dec 23, 2020 00:55:14.534 [0x7f32bfbe3700] DEBUG - Request came in with unrecognized domain / IP ‘ng1nx.gotd ns.ch’ in header Referer; treating as non-local

What is this error mean?  
Dec 23, 2020 00:55:14.527 [0x7f32bf3e2700] DEBUG - Request came in with unrecognized domain / IP ‘nginx.gotd ns.ch’ in header Referer; treating as non-local

---

<div class="post-metadata">

**Author:** ![ogret](https://avatars.discourse-cdn.com/v4/letter/o/7ba0ec/32.png) [@ogret](https://forums.plex.tv/u/ogret)\
**Post date:** [December 23, 2020, 4:48pm UTC](https://forums.plex.tv/t/nginx-plex-remote-access/667726/3 "2020-12-23T16:48:37Z")

</div>

I think i found the solution. Not the nginx was the problem it was the Plex Server with nginx.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [March 23, 2021, 4:48pm UTC](https://forums.plex.tv/t/nginx-plex-remote-access/667726/4 "2021-03-23T16:48:50Z")

</div>

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