Jump to content

Which ports for UFW


thatoneguy99

Recommended Posts

thatoneguy99

I have recently started trying to use UFW on my server. I have allowed port 8096, and can access Emby from all Emby apps and the web client. My Kodi install can connect to Emby server, and I can browse all content. It will not play any media though and I dont know why. As soon as I disable UFW it works fine.

 

Is there a different port that I need to enable on UFW. If anyone has any experience I would appreciate the help! The server and the Kodi client are both running Ubuntu 16.04.

Link to comment
Share on other sites

wowbutters

For Emby, things get wierd for me when I use add the media manually with add source > UPnP. Or click native path within the Addon. I get good results using the addon default.

 

Sent from Tapatalk.

Link to comment
Share on other sites

thatoneguy99

Addon default. This hasn't been an issue until messing with UFW so I know that's what it is. I disable UFW it and it works fine. I also added port 8945 to UFW allow and that didn't do it either. Works fine with Emby clients. Just not in Kodi.

 

 

Sent from my phone!

Link to comment
Share on other sites

wowbutters

That's just odd. I have 4+ kodi devices running and never had that issue..

Try and make a back up of kodi, then do a clean install. Try that.

If that doesn't do the same with Emby. (you may need premiere for Emby backup)

 

Sent from Tapatalk.

Link to comment
Share on other sites

wowbutters

If any of those work, slowly add your settings back until something breaks again and you found you culprit...maybe...

 

Sent from Tapatalk.

Link to comment
Share on other sites

wowbutters

Yep but I am also using a von split tunnel reverse proxy and portforward.sh for deluge.

 

Sent from Tapatalk.

Link to comment
Share on other sites

thatoneguy99

I use nginx reverse proxy but that's about as complicated as it gets.

 

 

Sent from my phone!

Link to comment
Share on other sites

Jdiesel

Addon default. This hasn't been an issue until messing with UFW so I know that's what it is. I disable UFW it and it works fine. I also added port 8945 to UFW allow and that didn't do it either. Works fine with Emby clients. Just not in Kodi.

 

 

Sent from my phone!

The only reason I ask is that my thoughts were that smb or nfs shares were somehow being blocked. I use UFW and the only port I have open for emby is 8920 for https. Are you connection manually or with Emby Connect? If connecting with Emby Connect maybe try entering the server manually.

Link to comment
Share on other sites

thatoneguy99

Manually. I'm going to install Kodi on another laptop and see what happens. If there was something in the logs would it be emby server side or Kodi side?

 

 

Sent from my phone!

Link to comment
Share on other sites

Jdiesel

I use nginx reverse proxy but that's about as complicated as it gets.

 

 

Sent from my phone!

 

How is your reverse proxy setup? If you are routing traffic over https you need to set the location to http://localhost:8096 in nginx and set the client to connect to Emby at your domain.com on port 443.

 

My UFW rules


To                         Action      From
--                         ------      ----
22                         ALLOW       Anywhere
32400                      ALLOW       Anywhere
54555                      ALLOW       Anywhere
443                        ALLOW       Anywhere
22 (v6)                    ALLOW       Anywhere (v6)
32400 (v6)                 ALLOW       Anywhere (v6)
54555 (v6)                 ALLOW       Anywhere (v6)
443 (v6)                   ALLOW       Anywhere (v6)

My nginx config

#user nobody;
# multiple workers works !
worker_processes 2;



events {
worker_connections 8192;
}


http {
#include /nginx/conf/naxsi_core.rules;
include mime.types;
default_type application/octet-stream;


sendfile off;

server_names_hash_bucket_size 128;
map_hash_bucket_size 64;

## Start: Timeouts ##
client_body_timeout 10;
client_header_timeout 10;
keepalive_timeout 30;
send_timeout 10;
keepalive_requests 10;
## End: Timeouts ##
#gzip on;


##EMBY Server##

server {
listen [::]:80 default_server;
listen 80 default_server;
return 301 https://$host$request_uri;
server_name domain.com; #your subdomain.domainname.com here
}

server {
listen [::]:443 ssl;
listen 443 ssl;
server_name domain.com; #your subdomain.domainname.com here

ssl_session_timeout 30m;
ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
ssl_certificate /etc/letsencrypt/live/domain.com/cert.pem; #your .pem file you created earlier.
ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem; #your private.key
ssl_session_cache shared:SSL:10m;
if ($scheme = http) {
return 301 https://$server_name$request_uri;
}

location / {
proxy_pass http://localhost:8096; # Local emby ip and non SSL port

proxy_hide_header X-Powered-By;
proxy_set_header Range $http_range;
proxy_set_header If-Range $http_if_range;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

#Next three lines allow websockets
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

}

## Sonarr ##

location ^~ /sonarr {
proxy_pass http://localhost:8989/sonarr;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $remote_addr;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_redirect off;

# Send websocket data to the backend aswell
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

}

## Radarr ##

location ^~ /radarr {
proxy_pass http://localhost:7878/radarr;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $remote_addr;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_redirect off;

# Send websocket data to the backend aswell
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

}

## Deluge ##

location ^~ /deluge {
proxy_pass http://localhost:8112/;
proxy_set_header X-Deluge-Base "/deluge/";

# Send websocket data to the backend aswell
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

}

## Jackett ##

location ^~ /jackett {
proxy_pass http://127.0.0.1:9117/jackett/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $remote_addr;
proxy_set_header X-
}

## PlexPy ##

location ^~ /plexpy {
proxy_bind $server_addr;
proxy_pass http://127.0.0.1:8181;
proxy_set_header Host $http_host;# Send websocket data to the backend aswell proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Real-IP $remote_addr;
}

## Prometheus ##

location ^~ /prometheus {
proxy_pass http://127.0.0.1:9090;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for;
Forwarded-Protocol $scheme;
proxy_redirect off;
# Send websocket data to the backend aswell
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

}

}
}




Edited by Jdiesel
Link to comment
Share on other sites

thatoneguy99

No I do not use https. Just regular port 80. Wouldn't that cause problems with my other Emby clients?

 

 

Sent from my phone!

Link to comment
Share on other sites

Jdiesel

I believe all clients are able to handle https. I am by no means an expert on this stuff though. Just setup my reverse proxy last week but everything has been working well for me including the Emby for Kodi app.

Link to comment
Share on other sites

thatoneguy99

This is what I see in the Kodi log when I try and play a video with UFW enabled...

16:53:26.234 T:140551058880256  NOTICE: EMBY.playbackutils -> Play called.
16:53:26.238 T:140551058880256  NOTICE: EMBY.playutils -> Verifying path: nfs://192.168.1.104/home/thatoneguy99/nfsexports/Media/TVShows/TV/Blindspot/Season 02/S02E08-We Fight Deaths on Thick Lone Waters.mkv
16:53:51.060 T:140552156691968   ERROR: CPythonInvoker(24, /home/thatoneguy99/.kodi/addons/plugin.video.emby.tvshows/default.py): script didn't stop in 5 seconds - let's kill it
16:53:51.060 T:140552156691968   ERROR: Playlist Player: skipping unplayable item: 0, path [plugin://plugin.video.emby.tvshows/4f94930d699e15ccd7cb4c2fd3697ce5/?dbid=1030&mode=play&id=f0121a6c7f745fa5b3c1e3f263a58bd1&filename=S02E08-We+Fight+Deaths+on+Thick+Lone+Waters.mkv]
16:53:57.855 T:140551058880256 WARNING: CPythonInvoker(24, /home/thatoneguy99/.kodi/addons/plugin.video.emby.tvshows/default.py): the python script "/home/thatoneguy99/.kodi/addons/plugin.video.emby.tvshows/default.py" has left several classes in memory that we couldn't clean up. The classes include: N9XBMCAddon9xbmcaddon5AddonE
16:54:02.439 T:140550581774080  NOTICE: EMBY.kodimonitor -> Method: Playlist.OnClear Data: {"playlistid":1}

This is what I get in the Kodi log when I have UFW disabled and the video plays. I thought it was my need to enable the NFS port on the UFW side of things but that didn't make a difference. 

 You can see in the logs, in the first instance, it shows verifying NFS path blah blah blah and then it says the script errors out. In the one below it verifies the NFS path with no problems and plays the video. I WILL figure this out somehow. lol

16:54:12.409 T:140551050487552  NOTICE: EMBY.playbackutils -> Play called.
16:54:12.412 T:140551050487552  NOTICE: EMBY.playutils -> Verifying path: nfs://192.168.1.104/home/thatoneguy99/nfsexports/Media/Movies/Movies/3 Ninjas (1992)/3 Ninjas(DVD-Rip).avi
16:54:12.416 T:140551050487552  NOTICE: EMBY.playutils -> Path exists.
16:54:12.416 T:140551050487552  NOTICE: EMBY.playutils -> File is direct playing.
16:54:12.441 T:140551050487552  NOTICE: EMBY.playbackutils -> Setting up properties in playlist.
16:54:12.504 T:140551050487552  NOTICE: EMBY.playbackutils -> Play as a regular item.
16:54:12.556 T:140552156691968  NOTICE: VideoPlayer: Opening: nfs://192.168.1.104/home/thatoneguy99/nfsexports/Media/Movies/Movies/3 Ninjas (1992)/3 Ninjas(DVD-Rip).avi

Link to comment
Share on other sites

Jdiesel

So it appears that it is in fact using nfs for the shares. Try opening ports 111 and 2049 (both TCP and UDP) and see if it works. 

 

I use addon paths which uses http rather than smb or nfs. If you did intend to use addon paths it may be that you need to do a library reset on the Kodi for Emby app to refresh those paths.

Edited by Jdiesel
Link to comment
Share on other sites

Jdiesel

Well I'm stumped. Only other thing I would try is changing the paths to addon, if it isn't already, and doing a full library reset. 

Link to comment
Share on other sites

thatoneguy99

I have been giving serious thought to finding a way to get rid of my Kodi install anyways. I don't want to switch my computer to Windows but Emby Theater for Linux just isn't there yet. However using the Emby for Kodi addon is more or less a work around anyways. Maybe I'll figure it out and post the solution.

 

 

Sent from my phone!

Link to comment
Share on other sites

wowbutters

What do you mean? I have more issues on windows with kodi and emby than Linux. Mostly resources being hogged by win and making kodi nigh unusable. On Linux my issues are distro related where some don't come oob with things needed to run one or the other. Windows is crap imo. The only one I use is 8 on my gaming laptop and a live minixp dual booted with a live Ubuntu USB. (I've noticed some pcs won't boot live Linux but I've never had a problem with minixp)

 

Sent from Tapatalk.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...