You are not logged in.

#1 2023-02-12 03:57:08

wdirksen
Member
From: New Zealand
Registered: 2012-02-23
Posts: 107

Plex server port 32400 not visible over the LAN at tcp, only tcp6

I built a router and server on the same machine using systemd-networkd, systemd-resolved, and firewalld. The router, DNS, Samba, firewall are all working as intended. While firewalld has been configured for Plex, the issue I am having is present even when firewalld is deactivated altogether.
Plex media server is running on the machine but is not reachable. According to netstat it would appear that the problem is the primary port for Plex (32400) is only available to LAN devices over IPv6 which Plex doesn't use:

# netstat -lnpt | grep Plex
tcp        0      0 127.0.0.1:33971         0.0.0.0:*               LISTEN      1395/Plex Plug-in [
tcp        0      0 127.0.0.1:33293         0.0.0.0:*               LISTEN      794/Plex Plug-in [c
tcp        0      0 127.0.0.1:32401         0.0.0.0:*               LISTEN      729/Plex Media Serv
tcp        0      0 127.0.0.1:32600         0.0.0.0:*               LISTEN      986/Plex Tuner Serv
tcp        0      0 127.0.0.1:40151         0.0.0.0:*               LISTEN      1353/Plex Plug-in [
tcp        0      0 127.0.0.1:31535         0.0.0.0:*               LISTEN      1293/Plex Plug-in [
tcp        0      0 127.0.0.1:38063         0.0.0.0:*               LISTEN      1169/Plex Plug-in [
tcp        0      0 127.0.0.1:37713         0.0.0.0:*               LISTEN      1254/Plex Plug-in [
tcp        0      0 127.0.0.1:46019         0.0.0.0:*               LISTEN      1290/Plex Plug-in [
tcp6       0      0 :::32400                :::*                    LISTEN      729/Plex Media Serv

So the Plex server is not visible to other LAN devices or even to itself over 127.0.0.1 or 10.0.0.1. Plex needs to be opened/enabled to port 32400 over IPv4 but I do not know what is causing this or know a way to enable it.
Here are some relevant config files and outputs. All NIC's have been renamed lan1, etc:

lan.network

[Match]
Name=br0
Type=bridge

[Network]
Address=10.0.0.1/24
Address=fd54:****:****:****::/64
DHCPServer=true
IPMasquerade=ipv4
IPv6PrivacyExtensions=kernel
IPv6SendRA=yes
DHCPv6PrefixDelegation=yes
# Domains=plex.direct #this entry makes no difference

[DHCPServer]
EmitDNS=yes 

br0.network

[Match]
Name=lan*

[Network]
Bridge=br0 

br0.netdev

[NetDev]
Name=br0
Kind=bridge 

99-sysctl.conf

# Enable IPv4 forwarding
net.ipv4.ip_forward = 1

# Enable IPv6 forwarding across all interfaces
net.ipv6.conf.all.forwarding = 1
net.ipv6.conf.default.forwarding = 1

# Enable privacy extensions
net.ipv6.conf.all.use_tempaddr = 2
net.ipv6.conf.default.use_tempaddr = 2
net.ipv6.conf.wan0.use_tempaddr = 2
net.ipv6.conf.lan0.use_tempaddr = 2
net.ipv6.conf.lan1.use_tempaddr = 2
net.ipv6.conf.lan2.use_tempaddr = 2
net.ipv6.conf.lan3.use_tempaddr = 2
net.ipv6.conf.lan4.use_tempaddr = 2
net.ipv6.conf.lan5.use_tempaddr = 2
net.ipv6.conf.lan6.use_tempaddr = 2

# Enable IPv6 stable privacy mode
net.ipv6.conf.br0.stable_secret = ....
net.ipv6.conf.br0.addr_gen_mode = 2

net.ipv6.conf.wan0.stable_secret =...
net.ipv6.conf.wan0.addr_gen_mode = 2

# Allow router advertisements through all interfaces
net.ipv6.conf.all.accept_ra = 2
net.ipv6.conf.default.accept_ra = 2

net.core.netdev_max_backlog = 16384
net.core.rmem_default = 1048576
net.core.rmem_max = 16777216
net.core.wmem_default = 1048576
net.core.wmem_max = 16777216
net.core.optmem_max = 65536
net.ipv4.tcp_rmem = 4096 1048576 2097152
net.ipv4.tcp_wmem = 4096 65536 16777216
net.ipv4.udp_rmem_min = 8192
net.ipv4.udp_wmem_min = 8192
net.ipv4.tcp_fastopen = 3
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.tcp_max_tw_buckets = 2000000
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_fin_timeout = 10
net.ipv4.tcp_slow_start_after_idle = 0
net.ipv4.tcp_keepalive_time = 60
net.ipv4.tcp_keepalive_intvl = 10
net.ipv4.tcp_keepalive_probes = 6
net.ipv4.tcp_mtu_probing = 1
net.ipv4.tcp_timestamps = 0
net.core.default_qdisc = cake
net.ipv4.tcp_congestion_control = bbr
net.ipv4.ip_local_port_range = 30000 65535
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1

#net.ipv4.conf.default.log_martians = 1
#net.ipv4.conf.all.log_martians = 1

net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.default.secure_redirects = 0
net.ipv6.conf.all.accept_redirects = 0
net.ipv6.conf.default.accept_redirects = 0

vm.dirty_ratio = 4
vm.dirty_background_ratio = 2
# firewall-cmd --info-zone=home
home (active)
  target: ACCEPT
  icmp-block-inversion: no
  interfaces: br0 lo
  sources:
  services: dhcp dhcpv6-client dns mdns plex roon-server samba samba-client samba-dc ssh
  ports:
  protocols: ipv6-icmp
  forward: yes
  masquerade: yes
  forward-ports:
  source-ports:
  icmp-blocks:
  rich rules:
 # ip route (private IP's removed)
default via 158... dev wan0 proto static
default via 158... dev wan0 proto dhcp src 158... metric 1024
10.0.0.0/24 dev br0 proto kernel scope link src 10.0.0.1
103... via 158... dev wan0 proto dhcp src 158... metric 1024
103... via 158... dev wan0 proto dhcp src 158... metric 1024
158.../24 dev wan0 proto kernel scope link src 158...
158... dev wan0 proto dhcp scope link src 158... metric 1024 

Last edited by wdirksen (2023-02-12 05:00:04)


Research | Trial | Make Mistakes | Ask questions | Learn | Repeat

Offline

#2 2023-02-12 07:19:26

Koatao
Member
Registered: 2018-08-30
Posts: 96

Re: Plex server port 32400 not visible over the LAN at tcp, only tcp6

Hello,
If Plex is not listening on TCP port 32400 with IPv4, then the issue is a misconfiguration of Plex.
It is Plex that is supposed to listen on this socket, not a network or security service.

I cannot help you with Plex as I don't know anything about it. But you should look into its configuration and post it if you cannot find what is missing.
The wiki https://wiki.archlinux.org/title/Plex seems to indicate that it should be listening on the required port out of the box thought...

Are you sure port TCP 32400 with IPv4 isn't used by anything else? What about port 32401, it is seems it is also Plex Media Serv[er|ice] behind?

EDIT: port 32401 not 32600.

Last edited by Koatao (2023-02-12 08:18:49)

Offline

#3 2023-02-15 07:56:18

wdirksen
Member
From: New Zealand
Registered: 2012-02-23
Posts: 107

Re: Plex server port 32400 not visible over the LAN at tcp, only tcp6

This is only happening in this scenario of Plex being served on the same machine as the router itself. It works on the same machine when the router/gateway functionality is turned off and dhcpcd is used to connect as a LAN device on the previous router. My first inclination is to suspect that the router is not configured properly while it appears to be working fine as a simultaneous router and a server with samba, Roon, and mariadb all functioning just fine as a server to LAN devices. It seems it has something to do with IPv6 settings in the server/gateway which is trickier and far less examples exist on the web for IPv6 than IPv4. Admittedly, I have not tested it with IPv6 functions turned off because the router as a whole doesn't work as good without IPv6; maybe should test that though

Last edited by wdirksen (2023-02-15 07:58:53)


Research | Trial | Make Mistakes | Ask questions | Learn | Repeat

Offline

Board footer

Powered by FluxBB