Plex.tv getting wrong IP address (172 address from docker and not my public IP)

Server Version#: 1.15.2.793 running on the latest OpenMediaVault 4
I’m not sure what logs I should post but can get any that are needed.
https://plex.tv/api/resources? shows my public IP as 172.98.67.93

The server is running in docker using host for the network configuration and I have tried restarting it, building from scratch, taking down the docker and bridge interface on the network and rebuilding from scratch, setting my preferred interface as ens18.

Here is the details section of the container:

[
    {
        "Id": "b61a8b98b28e5285b4e78b6f5f6115dba4a40914becbcb3971f24b3df738e663",
        "Created": "2019-03-25T01:03:35.25490015Z",
        "Path": "/init",
        "Args": [],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 25742,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2019-03-25T01:03:35.507543853Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        },
        "Image": "sha256:f7b7b3911fd489c970e7210be1eea29c3705c7ffb84b3ec3535f4998b6f44063",
        "ResolvConfPath": "/var/lib/docker/containers/b61a8b98b28e5285b4e78b6f5f6115dba4a40914becbcb3971f24b3df738e663/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/b61a8b98b28e5285b4e78b6f5f6115dba4a40914becbcb3971f24b3df738e663/hostname",
        "HostsPath": "/var/lib/docker/containers/b61a8b98b28e5285b4e78b6f5f6115dba4a40914becbcb3971f24b3df738e663/hosts",
        "LogPath": "/var/lib/docker/containers/b61a8b98b28e5285b4e78b6f5f6115dba4a40914becbcb3971f24b3df738e663/b61a8b98b28e5285b4e78b6f5f6115dba4a40914becbcb3971f24b3df738e663-json.log",
        "Name": "/Plex",
        "RestartCount": 0,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "docker-default",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [
                "/sharedfolders/AppData/Plex:/config:rw",
                "/sharedfolders/AppData/Plex Transcode:/transcode:rw",
                "/sharedfolders/media:/media:rw",
                "/etc/localtime:/etc/localtime:ro"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "host",
            "PortBindings": {},
            "RestartPolicy": {
                "Name": "always",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "CapAdd": null,
            "CapDrop": null,
            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "shareable",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "ConsoleSize": [
                0,
                0
            ],
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": [],
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": [],
            "DeviceCgroupRules": null,
            "DiskQuota": 0,
            "KernelMemory": 0,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": false,
            "PidsLimit": 0,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": [
                "/proc/asound",
                "/proc/acpi",
                "/proc/kcore",
                "/proc/keys",
                "/proc/latency_stats",
                "/proc/timer_list",
                "/proc/timer_stats",
                "/proc/sched_debug",
                "/proc/scsi",
                "/sys/firmware"
            ],
            "ReadonlyPaths": [
                "/proc/bus",
                "/proc/fs",
                "/proc/irq",
                "/proc/sys",
                "/proc/sysrq-trigger"
            ]
        },
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/17cae4bf5efa7cd4c2d655f14d25b793041e41feccef51105bbc25827caf1e5c-init/diff:/var/lib/docker/overlay2/7a27b59d9d87b06e31ac93cf23d09362c2ee67937be6506ed9d922ecfeee944c/diff:/var/lib/docker/overlay2/150f0a6ef431fb1e555679c49687e9c60d5a7c304ec0cea19d6da6a121efb06c/diff:/var/lib/docker/overlay2/6aca29bba566b0d5fff6657ef56a69cc5b08d2002c25e2844b6f7c8c0ccfbe4a/diff:/var/lib/docker/overlay2/d0d204e8ded6a6891fbaa24f74de77585f5a11cfdcd3c21c4d5369db111c30f8/diff:/var/lib/docker/overlay2/e57fdd6df68db62615bac0e4c60df608aebd8f964eae5fe0ef1a293841ac02de/diff:/var/lib/docker/overlay2/012f44dc8ac705a11b43a7130752852cdfba19c8a3bf7e21d58a1557b2cb04c3/diff",
                "MergedDir": "/var/lib/docker/overlay2/17cae4bf5efa7cd4c2d655f14d25b793041e41feccef51105bbc25827caf1e5c/merged",
                "UpperDir": "/var/lib/docker/overlay2/17cae4bf5efa7cd4c2d655f14d25b793041e41feccef51105bbc25827caf1e5c/diff",
                "WorkDir": "/var/lib/docker/overlay2/17cae4bf5efa7cd4c2d655f14d25b793041e41feccef51105bbc25827caf1e5c/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [
            {
                "Type": "bind",
                "Source": "/etc/localtime",
                "Destination": "/etc/localtime",
                "Mode": "ro",
                "RW": false,
                "Propagation": "rprivate"
            },
            {
                "Type": "bind",
                "Source": "/sharedfolders/AppData/Plex",
                "Destination": "/config",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            },
            {
                "Type": "bind",
                "Source": "/sharedfolders/AppData/Plex Transcode",
                "Destination": "/transcode",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            },
            {
                "Type": "bind",
                "Source": "/sharedfolders/media",
                "Destination": "/media",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            }
        ],
        "Config": {
            "Hostname": "OMV4",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "1900/udp": {},
                "32400/tcp": {},
                "32400/udp": {},
                "32469/tcp": {},
                "32469/udp": {},
                "5353/udp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "LANGUAGE=en_US.UTF-8",
                "DEBIAN_FRONTEND=noninteractive",
                "PGID=100",
                "PLEX_MEDIA_SERVER_INFO_DEVICE=Docker Container (LinuxServer.io)",
                "LANG=en_US.UTF-8",
                "HOME=/root",
                "NVIDIA_DRIVER_CAPABILITIES=compute,video,utility",
                "PLEX_MEDIA_SERVER_HOME=/usr/lib/plexmediaserver",
                "PLEX_DOWNLOAD=https://downloads.plex.tv/plex-media-server-new",
                "TERM=xterm",
                "PUID=1000",
                "PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=/config/Library/Application Support",
                "PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6",
                "ADVERTISE_IP=[CENSORED BUT CORRECT PUBLIC IP",
                "PLEX_ARCH=amd64",
                "PLEX_MEDIA_SERVER_USER=abc",
                "PLEX_MEDIA_SERVER_INFO_VENDOR=Docker"
            ],
            "Cmd": null,
            "Image": "linuxserver/plex:latest",
            "Volumes": {
                "/config": {},
                "/transcode": {}
            },
            "WorkingDir": "",
            "Entrypoint": [
                "/init"
            ],
            "OnBuild": null,
            "Labels": {
                "MAINTAINER": "sparkyballs,TheLamer",
                "build_version": "Linuxserver.io version:- 1.15.2.793-782228f99-ls12 Build-date:- 2019-03-21T13:02:30+00:00",
                "maintainer": "sparklyballs, thelamer"
            }
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "b87feafdb40b1947e62380a68145956a46ac6add7127ccee00b6e5da9302380b",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {},
            "SandboxKey": "/var/run/docker/netns/default",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "host": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "336db7655aa4d5f1ff2113aa3b64b6a31867f0ceb4e9e062662527b6bd41ea01",
                    "EndpointID": "5045e0c360d8a30314d3da327169c444cdad52288d794dbcc3b4b0871e5127f4",
                    "Gateway": "",
                    "IPAddress": "",
                    "IPPrefixLen": 0,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "",
                    "DriverOpts": null
                }
            }
        }
    }
]

I don’t know anything about Docker, but I know that this IP is not a private IP.

So your Docker would/should not use it for its own NAT.

Or maybe this IP is not from Docker, but is your real public IP…

I was able to resolve this. I’m also running a container for transmissionopenvpn so transmission’s traffic goes through my VPN and Plex was using the IP from that for my public IP address.

I turned off that container and rebuilt my Plex container and it’s working correctly now.

172 is a private IP range but it’s not common for home use and docker uses it for it’s container IPs.

Not entirely correct.
172.16.0.0 – 172.31.255.255 are private
172.0.0.0 – 172.15.255.255 are public
172.32.0.0 – 172.255.255.255 are public as well

Ah you’re right. My bad on that. Haven’t had to use them much so I’m not as familiar with them. Now I was having this issue after I turned transmission back on:

Once I turn the TransmissionOpenVPN container back on plex sets that tun interface as the default for remote access. When using wget to find what the host thinks it’s public IP is it was giving the public IP of the VPN.

To resolve this I switched the transmission docker container to use bridge networking and that seems to have done the trick so far.

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