Jump to content
francotel

How to change port (8096 --> 80) to acces emby from Freenas

Recommended Posts

francotel

IP ADDRESS FREENAS: 10.233.22.12

IP ADDRESS EMBY: 10.233.22.5:8096

 

Someone resolve this problem?

i want to access emby like this : 10.233.22.5 (no port)

 

 

   58ed41b57d22c_ScreenHunter_001.jpg

58ed41c0c0518_ScreenHunter_002.jpg

Share this post


Link to post
Share on other sites
Luke

That will always be more complicated and may require running emby server with elevation (but i'm not sure if that's true on bsd).

Share this post


Link to post
Share on other sites
francotel

OK my server is a core i7 (second generation) 16gm ram 6TB and i want that my users signed with IP no port, any solution?

other OS could be?

what is your recomendation?

Share this post


Link to post
Share on other sites
francotel

The solution is :

 

In the *JAIL SHELL* (as root), run the following :
 
from telnet freenas
 
jls
JID  IP Address      Hostname                      Path                      
     -            software                      /mnt/volume1/jail/software
 
Code:
 
echo "net.inet.ip.portrange.reservedhigh=0" >> /etc/sysctl.conf
 
The jail shell can be spawned with `jexec N sh` from NAS root shell (where N is the 0-based jail number, check that you are in the correct one with `ifconfig`).
 
You can then tell Emby to run on port 80 via web advance emby
 
58ee41ff30be8_ScreenHunter_005.jpg
  • Like 1

Share this post


Link to post
Share on other sites
Luke

Thanks for the info !

Share this post


Link to post
Share on other sites
Sludge Vohaul

Hi,

 

 

The solution is :

 

<snip>

 

The proposed solution should be working, but you also should be aware of what it means.

Traditionally (at least in BSD) ports below 1024 are regarded as reserved ports (or call it well known services). This means only root can start a service which binds to a port below 1024. The reason is to prevent misuse (e.g. on 80 is running a http service which was installed by root, and not a http service which was started by user badass).

By setting the reserved ports range to 0 (net.inet.ip.portrange.reservedhigh=0) you allow ANY user to bind to a port above 0 ("real" web servers (which bind to 80) start as root, bind the port and drop privileges to process the client connections).

There's probably no risk in doing the sysctl in a home environment, but you none the less do what should not be done :)

 

You as well might start emby with sudo, but then it would probably run as root which is an even worse idea. 

 

Personally if I had to run emby on port 80 at any cost it'd try to redirect it with a web server or try to rewrite the address with dnsmasq (I think it should be possible though I've never done it).

 

--

sv

 

Share this post


Link to post
Share on other sites
josh4trunks

 

The solution is :

 

In the *JAIL SHELL* (as root), run the following :
 
from telnet freenas
 
jls

JID  IP Address      Hostname                      Path                      

     -            software                      /mnt/volume1/jail/software

 
Code:
 
echo "net.inet.ip.portrange.reservedhigh=0" >> /etc/sysctl.conf
 
The jail shell can be spawned with `jexec N sh` from NAS root shell (where N is the 0-based jail number, check that you are in the correct one with `ifconfig`).
 
You can then tell Emby to run on port 80 via web advance emby
 
58ee41ff30be8_ScreenHunter_005.jpg

 

 

You don't need to do this from the jail shell. Uou can set sysctl's for jails in the FreeNAS WebUI > Jails > Edit Jail

Share this post


Link to post
Share on other sites
shivalwolf

A better way to handle this is to probably use ipfw fwd rules. This way emby is still running on a high unprivlaged port but the system forwards 80 to 8096

 

ipfw add 100 fwd 127.0.0.1,8096 tcp from any to me 80 in

 

The rule can be added into the default firewall for persistence as well or as a on startup script from /etc/rc.conf or /etc/rc.firewall

Exact instructions can be found on google for "freebsd firewall" or "freebsd ipfw"

Share this post


Link to post
Share on other sites
dolphin

 

The solution is :

 

In the *JAIL SHELL* (as root), run the following :
 
from telnet freenas
 
jls

JID  IP Address      Hostname                      Path                      

     -            software                      /mnt/volume1/jail/software

 
Code:
 
echo "net.inet.ip.portrange.reservedhigh=0" >> /etc/sysctl.conf
 
The jail shell can be spawned with `jexec N sh` from NAS root shell (where N is the 0-based jail number, check that you are in the correct one with `ifconfig`).
 
You can then tell Emby to run on port 80 via web advance emby
 
58ee41ff30be8_ScreenHunter_005.jpg

 

You just made my day!!

The Emby server plugin on my FreeNAS box wouldn't start anymore because I had set ports to 80 and 443 for http and https respectively in my Emby server web UI settings page!

After spending a couple of hours searching this and the FreeNAS forum for a solution, I finally found your post! Yay! No need to delete and reinstall the Emby plugin!

Share this post


Link to post
Share on other sites
dolphin

By the way, will this survive Emby server plugin updates?

Share this post


Link to post
Share on other sites
knase

I would just use the default port and redirect to it with nginx. This way you can setup a jail that does all the SSL/TLS on behalf of the services you want to host (e.g. you only need to bother setting up letsencrypt in one jail). The service does not even need a public IP, only the nginx jail does, or rather port 80 and 443 needs to be forwarded to the jail.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...