I am running Plex via Package Center on Synology DSM 7.1.1. The challenge I face is that I run a VPN client on the synology and for the Remote Access to work via a direct connection I setup static routes based on plex.tv IP addresses (NAS Synology VPN Bypass Plex - #15 by Carp3Di3m). It works well except the IP addresses change almost daily so its a lot of manual work. I do have a task that runs on the synology that emails me when IP changes, but still not ideal.
I was wondering if it is possible to possible setup Plex in a Docker and have the Docker container use the Synology Bond1 Network Gateway instead of the VPN Gateway (which is the system default). I wasn’t able to get this to work via Docker and was wondering if anyone had. If so:
How do you setup the container? I assume using a docker compose? What are the options I need to include?
For #1, how do I find out the correct network device (or whatever is the correct term) to use?
What else would I need to know that i don’t even know I need to ask!
This isn’t necessarily meant as a tutorial, just a high-level overview of one way this might be accomplished. There are likely several ways this could be handled so you may want to wait for some other more knowledgable folks to weigh in.
Having said that, if I were trying to accomplish (isolate a Docker container to a specific interface) I’d likely create a separate Docker network using the ipvlan driver. Something like (assumes that your bond network is 172.16.0.0/24; substitute values which make sense for your network):
This creates a Docker network named ‘plex_net’ using the ipvlan driver. (You could likely accomplish the same using the macvlan driver.). Now, when you create the container, specify this network (and a bridge network so that DSM can communicate with the container) on the network tab.
To find the interface name to use in the command above (and to actually run the command above), you’ll need to establish an SSH session to the NAS. Once there, you can run ifconfig to list all interfaces.
First, thank you so much for the response and I apologize for the delay in thanking you!
One thing I haven’t been able to figure out is how to determine what the subnet should be. I’m lost when it gets to IP addresses and the /XX format. Any advice there?
On the --gateway, I assume that should be my router gateway?
Again, thank you for the advice, this is fantastic! I’ve been updating the static routing every couple of days for months so this would be a huge saver (just more efficient!).
Hmm… Nothing off the top of my head. It was a while back that I tested this, but I don’t recall having to jump through any additional hoops. I’ll try to find some time to test this out again.