Linux Firewall blocks access to minidlna/upnp device
#1
I can successfully access my shared media drive I have connected to my DD-WRT router (minidlna) while browsing my media accessing UPNP device in Kodi with the firewall turned off. When it is on, I have no access.

I got a list of the ports Kodi uses by typing sudo netstat -tulpn and opened ports that kodi uses, using ufw. I set the firewall rules accordingly and now upnp is blocked. I notice when ever I startup Kodi, there are only 3 port numbers that remain static (udp 1900, 9777, and TCP 9090). The other tcp/udp port numbers change. I wonder if this causes a conflict with my firewall? I'm lost here and I hope this all makes sense. Any help would be much appreciated!
Reply
#2
Same problem.

These didn't work for me:
http://forum.kodi.tv/showthread.php?tid=...rewall+ufw
https://zaplanincan.wordpress.com/2015/0...ork-ports/

I'm using ufw firewall.
Reply
#3
It works!

I allowed these ports : https://zaplanincan.wordpress.com/2015/0...ork-ports/
AND 2869/tcp, 5353/udp
Reply
#4
Hi

When I run any of those commands in that post https://zaplanincan.wordpress.com/2015/0...ork-ports/ via terminal I get this error returned No chain/target/match by that name

I am running Ubuntu 15.10 its an odd problem

It will connect to Android TV box via UPNP and see the Android Kodi install. With the firewall on Ubuntu OFF Android sees Kodi. With it on, it doesn't and I have tried every way with UFW I know how to and it still wont work.

Can you help or anyone?
Reply
#5
Hi

You mean you are in this case, right? https://lut.im/OTHmRsjQEn/MZSpsHd6NATISaZw.png

Before everything, let's give a try to a graphical interface.
In your terminal, type
sudo aptitude install gufw
to install Gufw, a graphical frontend for ufw.

Then, run it.
Try to see if the problem comes from incoming traffic or outgoing traffic by changing the global "allow/deny/reject" rules,
then configure the ports as I said in my last post.
If you need more help to use the GUI, let me know.
Reply
#6
Hi

Thanks for the reply. Yeah just like in your image how you explain it. I do have UFW always have had and turned it off and it worked. i even disconnected the routers coax cable to experiment without being on the internet.

I gave up in the end! Ubuntu kodi wouldnt read the upnp on android tv box until i turned off and back on the android one it was annoying!!

So I used samba in the end!! and used the Ubuntu one as a server end type set up with username and password etc pointing the addons movies and tv to the ones on the ubuntu linux install as well as the libraries for movies and tv, and also watched list .db for that addon.

the only problem now is that it has duplicated everything in the libraries ahahah so i have to fix that now and auto removing them did not solve the issues!!
Reply
#7
Another thing I had to do is reset the content on the movies and tv sources in the library section as it then shows you have none at all. So then you have to re scan with a scraper all over again.

Annoying but I learned something thought that info might be useful as well.

I think the usb 2.0 nas ethernet hub that you set up the settings with http over a web browser is the best option. I am sure I can work out how to set that up so I can access it away from home from the internet at some point.

Samba app that is in the Ubuntu repo works like a charm slightly off topic but it does work well and is very easy to use. I didn't even need to read up on it or follow a tutorial it was just completely obvious what to do to set up the Samba server settings then access that through Kodi the other end with the user name and password.

Sorted. I wont be using UPNP any time soon again that was just annoying!!
Reply
#8
Ok, happy that you solved your problem.
I wouldn't have done that way, but there is no perfect solution other than what you are happy with. Wink

If you ever want to give another try to UPNP, try Gufw at first and open the right ports.


A last thing: don't forget to put a strong password if you plan to access your content away from your home Tongue
Reply
#9
Cool thanks. Yeah the password is pretty ridiculously strong to be honest so fingers crossed hah!!

Thanks for the offer of the help. I find upnp not having a username and password a bit of a no no really as anyone who comes around your gaf who has the wifi password i give them could access anything they wanted to. So defo happy to stick with Samba as well as the Ubuntu App is just gold!!

Thanks again for the help.

Sound.
Reply
#10
Just wanted to say thanks on the 'gufw' suggestion, it helped me solve a dnla port issue on Ubuntu 22.04 with Debian Kodi.
Reply

Logout Mark Read Team Forum Stats Members Help
Firewall blocks access to minidlna/upnp device0