I’m running Plex Media server on Windows Server 2012 R2 (would be nice if it natively ran as a service, but that’s a different question).
I’ve got multiple NICs in the server and will soon be installing RRAS for VPN services.
I’ve recently noticed that Plex Media server will randomly bind to a different NIC each time it starts up. I noticed this because some times it is available to the world (when it’s on the NIC that has port forwarding routed to it) and some times it isn’t (when it’s on the NIC that does not have port forwarding routed to it).
Each NIC has its own IPv4 and IPv6 address.
How can I specify Plex to bind to a specific NIC so that it will always come up on the NIC that has port forwarding routed to it?
Plex itself would need to be configured to use one of the available interfaces/IPs in the system. As far as I know Plex doesn’t have this feature in it and since it doesn’t it grabs which ever NIC responds first
Now saying all of that you could play with the binding order to see if it helps:
To modify the protocol bindings and network provider order
Open the Network Connections folder and view available connections.
Press ALT to display the menu bar, and then on the Advanced menu, click Advanced Settings. The Advanced Settings dialog box opens.
In the Advanced Settings dialog box, on the Adapters and Bindings tab, in the Connections list, click the connection that you want to modify. If you wish to change the order in which your connections are tried, click the up or down arrow buttons to rearrange the order.
In the Bindings for ConnectionName list, click the protocol that you want to move up or down in the list, and then click the up or down arrow buttons to rearrange the order of the protocols.
In the Advanced Settings dialog box, click the Provider Order tab.
On the Provider Order tab, in the Network Providers list, select the provider that you want to move up or down in the list, and then click the up or down arrow buttons to rearrange the order.
The way I’ve done it in the past was to create a virtual machine with a virtual switch and connect that to whichever NIC I wanted to use for that app.and it works fine.
According to this thread ( http://forums.plex.tv/discussion/comment/1024255 ) (the master of what OttoKerner linked to), it looks like Plex will bind to the first adapter it find that has the required port open. So, if I block the port by default on my other NICs, then leave it open on the proper NIC, it “should” always bind to the right NIC. I’ll try that out next chance I get and report back.
Have you considered running a virtual machine in Hyper-V? You could always create one and run Plex Media Server within the VM. Hyper-V manager will allow you to manage which NIC the VM uses. Hyper-V is free and Windows 2012 R2 Standard is licensed to run one server as well as up to two VM’s. Just a thought…
Not sure about Window Server, since I’m running Windows 8 & 10, but it actually seems Plex will always favour the NIC with the lowest default route metric (ie- your default “internet” connection).
Doing this change means all traffic destined for the internet will travel down this path first (and use any other as a backup).
find out which adaptor has the lowest metric:
1a: at a command prompt type “route print”
1b: look for the network destination “0.0.0.0” - if you have multiple, you need to identify which adaptor corresponds to which IP “interface”
1c: note the metric(s) assigned to each adaptor.
2: open the network control panel (various methods, but generally go into “network and sharing center” then click on “change adapter settings”
3: select the adaptor you want to move down in priority
4: right-click and select “properties”, and then open “internet protocol version 4 (TCP/IPv4)”
5: under the “general” tab, select “advanced”
6: clear the checkbox “automatic metric” and type in a number LARGER than the metric of your preferred adaptor (remember step 1c?).
eg: in my setup, I want the wifi to be preferred:
Ethernet metric: 10 (Windows default)
Wifi metric: 25 (Windows default)
NEW Ethernet metric: 50 (manual override).
Christmas has come early ! The feature of allowing the user to select a specific network interface is now available as from Plex Media Server version 1.13.5.5291 which was released to Plex Pass beta yesterday
I have been fighting this for a while on a headless ubuntu server and just found a good solution to share. My pms is version 1.18.2.2015. I did a recent update to ubuntu packages and after reboot, plex media server was connecting to the wrong interface. I solved it by putting a rule in my firewall that only allowed port 32400 on the right interface with the ip address of the server. I used ufw to accomplish it. The settings in plex to prefer the one interface didn’t seem to work for me.