miniDLNA over OpenVPN Configuration

Hello,

I am trying to get my miniDLNA server to work over OpenVPN. I have managed to get SAMBA and things like transmission-web to work over my VPN, but when I try for my miniDLNA server -- it doesn't work.

I Google'd my issue and I could not really find any useful information. Someone said that because miniDLNA uses multicast it is not going to broadcast via VPN because it can't differentiate between my IP addresses and global ones (which makes sense).

Someone said they were able to find a solution, but I have no idea how to implement it which is why I came to the forums to ask. They said in order to get this to work I have to:

  • Run two DLNA daemons, one on 10. and one on 192.
    OR
  • Run Bridged OpenVPN:

I am a bit of a novice, I apologize. I have no idea how to run two instances on linux or OpenWRT. I am very excited to learn, though. Oh -- and there was a guide but its not for the OpenWRT and the arguments don't really work cause the command line is different.. I linked it below if anyone wants to take a look.

Also, I hear you can also have miniDLNA work on OpenVPN using the argument listen_ip 'insert.ip.address.here' inside /etc/config/minidlna, is this true? I know that if this works, you can't have local DLNA, you have to pick one or the other to broadcast. But I think I also read elsewhere that this has been removed -- why would they do this?

Last, last thing: I also just bought a Raspberry Pi 4 which is coming tomorrow in the mail. Don't know if I can fix the miniDLNA issue by having two devices.

I just don't get why SAMBA and transmission-web, other programs, work but miniDLNA does not.

Also, does anyone have any cool recommendations on stuff to install on OpenWRT? I have the basic cool stuff, please mentions cool things you are proud of or want to make you never leave OpenWRT. Thanks!

https://spremi.wordpress.com/2014/06/30/minidlna-multiple-instances/

1 Like

Can I bump on here? If so, 'hella' bump plz

Looks like multi-instance requires patching the init script.
But it may be simpler to comment out the interface binding:

Bridging is also possible:

Those two links you replied with, the automated and bridging, to enable these do I just paste those two into terminal to enable? Or is there any other setup?

What is Automated OpenVPN? What is bridging? I tried googling but I don't really understand. Sorry for being a noob.

Also, when you say comment out the interface binding, I do that in the file you provided for minidlna.

I am assuming I then have to re-compile minidlna right? or do that makefile thing?

Could you please instruct me on how to do this? I am a complete rookie when it comes to this stuff but I am really trying to learn.

Do I just download the entire minidlna section that contains the files, patches, and makefile? Then how do I run the makefile? do I just copy it somewhere into my router directory and then do some sort of command?

The automated script should set up OpenVPN server and generate the client profile.

The bridging script switches the server/client to use bridging.

Yes.

No, just edit the init script:

My good sir, THANK YOU! This helps me a lot. I have been ssh'ing and editing files with vi and whatnot but I just need to locate the .init file for minidlna :slight_smile:

Thanks!!

1 Like

The init script location is according to the makefile:

Thanks for this. I modified it and hashed '#' out the line for instances and restarted the service with

service minidlna restart

I still cannot see it over OpenVPN :frowning:

netstat -l -n -p | grep -e minidlnad

This is the response I get to that after the modification:

netstat -l -n -p | grep -e minidlnad

tcp 0 0 0.0.0.0:8200 0.0.0.0:* 26349/minidlnad
udp 0 0 10.1.1.1:42734 0.0.0.0:* 26349/minidlnad
udp 0 0 239.255.255.250:1900 0.0.0.0:* 26349/minidlnad
udp 0 0 192.168.8.1:50060 0.0.0.0:* 26349/minidlnad
udp 0 0 98.232.149.88:42437 0.0.0.0:* 26349/minidlnad

1 Like

As you can see it is serving on all interfaces including the VPN.

I see.. Thank you!

How come VLC player doesn't see my minidlna/upnp server when connected my OpenVPN? Do you know if there is a way to manually connect to it? Such as an IP:port I can point vlc to? Right now it only lets me point it to SMB, FTP, and Plex which are doable but its not the same as minidlna.

My goal was to have my family's PCs/phones/devices connect with my OpenVPN (which I was able to do) and then run my minidlna so that they could see it in VLC or similar media players.

1 Like

Actually mate. The problem lied with VLC. Your solution worked!!! I got this to work over VPN super easily thanks to you!

You are a ROCK STAR! You helped me solve a problem 20+ people were also having (I googled this issue and everyone asking got no solution) BUT YOU DID! Everyone said do multiple instances or tunnel your VPN β€” yada yada yada. You provided a simple very useful solution and even helped me implement it because I was too incapable (I am learning Linux slowly).

Thank you, thank you, thank you!!

Solution: use nPlayer Lite (or buy it without ads) for iOS devices and scan the network, not for DLNA devices but there is an option just to β€œScan network.”

Woot!

da zdravstvuyet mat' rossiya!!

1 Like

So again the solution for future reference (and Linux rookies like myself):

vi /etc/init.d/minidlna

And comment out this line by adding β€˜#’ in front of it.

#echo "network_interface=$interface"

Restart minidlna

service minidlna restart

Check that minidlna is running on OpenVPN instance

netstat -l -n -p | grep -e minidlnad

Thanks to @vgaetera !

1 Like

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