Jump to content

Emby - wrong external IP and not connecting


Go to solution Solved by Happy2Play,

Recommended Posts

Posted (edited)

Hello everyone,

in the dashboard emby will show me a wrong external/WAN ip. I verified this by checking with "whatsmyip.com.

Additionally, I enabled port forwarding in my router.

When trying to connect to my correct WAN IP (via Android APP) with the correct port, I will instantly get the following error:

Quote

We are unable to connect to the selected server right now. Please ensure it is running and try again.

 

UPDATE:

IP is now correct in dashboard but still can't connect.

Also not from browser.

 

Edited by Utini
Posted

I added the embyserver.log

I also tried disabling automatic port mapping.

Still no connection possible.

I have a static IP CG NAT IP.

GrimReaper
Posted

If you're behind CGNAT, usual procedures won't do. Few methods you can tackle that:

 

  • Like 1
Posted (edited)
20 minutes ago, GrimReaper said:

If you're behind CGNAT, usual procedures won't do. Few methods you can tackle that:

 

I will read that post in detail later.

What I can say for now:

I have a static IP from my provider.

Using my router as VPN Server works

Port forwarding for torrenting works

So emby port forwarding should work as well?

 

Edit: With the static IP that I got, I also have to set a special VLAN ID and user/passwort in my router/modem. Maybe thats why port forwarding works for me with CG NAT? But still, emby doesn't work.

Edited by Utini
Posted

A cgnat makes this a bit more complicated. I would go through the other postings and see if they help. Thanks.

Posted (edited)
1 hour ago, Luke said:

A cgnat makes this a bit more complicated. I would go through the other postings and see if they help. Thanks.

Checked the posting and understand them. I am also confident that running those additional steps/softwares would help. 

But it shouldn't be required for me. I checked again. Several "server applications" work fine already with my static IP. Examples: Syncthing, VPN Server, Torrent

I didn't have to do any extra steps for those applications because to my understanding the static IP that I have is an individual IP that direct only to my network. And I bought that static IP specifically to fix port forwarding issues with torrent/VPN.

But at the same time I have no idea how to further troubleshoot this?

Edited by Utini
Posted

With websites like "canyouseeme.org" it says that e.g. my torrent port is open.

Emby port is closed (connection refused). The port is forwarding correctly / the same way as my torrent client.

Both (torrent client and emby) have UPNP enabled.

Posted

How exactly is the port forwarding set?

Posted (edited)
On 12/19/2022 at 6:04 PM, Luke said:

How exactly is the port forwarding set?

I have attached the screenshots of my router configuration.

I have two emby ports added because I tried using a different one.

 

 

 

 

Edited by Utini
Posted

Hi,

You're running a private VPN service for inbound access which is different than using a public port to hide you WAN address.  When using public VPNs you are effectively getting a new WAN address which is the exit point of the VPN service, but Emby only knows about your actual routers WAN address unless it is started after VPN starts.  If VPN restarts it causes issues because the IP changes. Also unless you get an optional/extra port for your own use nobody can access your Server because the exit point is firewalled.

That's the general brief overview of issues with Public VPNs.  You have a private inbound VPN using your WAN port IP which should not be a problem but might require a slight tweak which we will find out with a test.

Your port forwarding is incorrect, so we need to fix this as well. We're also going to harden up your network a slight bit by removing UPnP.  First thing I do with every router is turn that off as it's a potential security issue as any script or little program can open ports exposing your network to the outside.  Someone can send you something in email that runs when you open the message opening a port on your router which a hacker can then use!  So we will remove that functionality and put YOU in charge of opening ports when needed. :)

Let's start by turning off the two options above in your screenshot using UPnP then restart the router.
n Emby remove the PortMapper plugin so it doesn't try to open ports for you then restart Emby.

Now you are in control of port mapping. :) Just in case the 2 port forwards used for VPN and torrents disappears, set them back up again using the info in the picture above this message.

Remove all the Emby entries from the port forwarding in your router. Now create one new port forward using these settings.
Service Name = Emby HTTP
External Port = 58196 (matches what you already changed it to in Emby)
Internal Port=8096 (this is the port Emby uses by default for internal addresses.  When your router port forwards to Emby it will be from a local IP address so Emby will get it n 8096.
Internal IP Address=192.168.50.27
Protocol =TCP
Leave Source IP blank as it is now.

Test again with canyouseeme.org using port 58196 and see what happens.
If it doesn't work disable VPN on router, then restart it.
Test again if needed with canyouseeme.org
Restart your VPN as we did that just for a quick test.
 

Posted (edited)
On 12/19/2022 at 7:52 PM, cayars said:

Hi,

You're running a private VPN service for inbound access which is different than using a public port to hide you WAN address.  When using public VPNs you are effectively getting a new WAN address which is the exit point of the VPN service, but Emby only knows about your actual routers WAN address unless it is started after VPN starts.  If VPN restarts it causes issues because the IP changes. Also unless you get an optional/extra port for your own use nobody can access your Server because the exit point is firewalled.

That's the general brief overview of issues with Public VPNs.  You have a private inbound VPN using your WAN port IP which should not be a problem but might require a slight tweak which we will find out with a test.

Your port forwarding is incorrect, so we need to fix this as well. We're also going to harden up your network a slight bit by removing UPnP.  First thing I do with every router is turn that off as it's a potential security issue as any script or little program can open ports exposing your network to the outside.  Someone can send you something in email that runs when you open the message opening a port on your router which a hacker can then use!  So we will remove that functionality and put YOU in charge of opening ports when needed. :)

Let's start by turning off the two options above in your screenshot using UPnP then restart the router.
n Emby remove the PortMapper plugin so it doesn't try to open ports for you then restart Emby.

Now you are in control of port mapping. :) Just in case the 2 port forwards used for VPN and torrents disappears, set them back up again using the info in the picture above this message.

Remove all the Emby entries from the port forwarding in your router. Now create one new port forward using these settings.
Service Name = Emby HTTP
External Port = 58196 (matches what you already changed it to in Emby)
Internal Port=8096 (this is the port Emby uses by default for internal addresses.  When your router port forwards to Emby it will be from a local IP address so Emby will get it n 8096.
Internal IP Address=192.168.50.27
Protocol =TCP
Leave Source IP blank as it is now.

Test again with canyouseeme.org using port 58196 and see what happens.
If it doesn't work disable VPN on router, then restart it.
Test again if needed with canyouseeme.org
Restart your VPN as we did that just for a quick test.
 

Thank you for your help but that didn't work either.

VPN Server on my Router is disabled

Emby Port mapper removed

Port forwarding configured as you described.

51337 is open, 58196 is closed.

 

 

Edited by Utini
Happy2Play
Posted

Does it work if configure for Emby default port? 8096

Or configuring internal and external ports the same in Emby and Port forwarding?

Posted (edited)
On 12/19/2022 at 9:07 PM, Happy2Play said:

Does it work if configure for Emby default port? 8096

Or configuring internal and external ports the same in Emby and Port forwarding?

I tried that already as well :( I have custom local ports in emby but that shouldn't matter as well.

canyouseeme is still closed and http://myexternalip:port doesnt work.

Btw, 1048 is closed as well (according to canyouseeme) but VPN server works.

31337 is opened, torrent works.

Syncthing probably won't work atm because I didn't forward the port (but worked in the past with upnp)

@edit: just forwarded syncthing port. canyouseeme.org now shows that port as open. syncthing works as well now again.

 

So I can forward / open ports for other apps (e.g. torrent / syncthing ) but not for emby?

Edited by Utini
Posted

You're using lots of custom ports, are you sure you didn't get any of them mixed up? What exactly did you enter into canyouseeme?

Happy2Play
Posted
1 hour ago, Utini said:
2 hours ago, Happy2Play said:

Does it work if configure for Emby default port? 8096

Or configuring internal and external ports the same in Emby and Port forwarding?

I tried that already as well :( I have custom local ports in emby but that shouldn't matter as well.

canyouseeme is still closed and http://myexternalip:port doesnt work.

You tested making local/internal and public/external ports being the same?  

Can you post a server log as previous one does not show Emby listening on 8096.

Posted

Try setting the remote http port in Emby to 8096.
Add a new port forward on your router using 8096 and 8096 for both external and internal.

Check the local firewall on the Emby Server to make sure port 8096 is allowed for both public and private networks.  In other words you want it open regardless of origination.

If that doesn't work, I can do a remote support session with you to help you resolve this.

Carlo

PS try shutting down both the router and the Emby Server. Restart the router after 30 seconds.
Once the router is up restart the Emby Server.
Verify the IP address of the Emby Server is 192.168.50.27

Posted (edited)
22 hours ago, cayars said:

Try setting the remote http port in Emby to 8096.
Add a new port forward on your router using 8096 and 8096 for both external and internal.

Check the local firewall on the Emby Server to make sure port 8096 is allowed for both public and private networks.  In other words you want it open regardless of origination.

If that doesn't work, I can do a remote support session with you to help you resolve this.

Carlo

PS try shutting down both the router and the Emby Server. Restart the router after 30 seconds.
Once the router is up restart the Emby Server.
Verify the IP address of the Emby Server is 192.168.50.27

Tried that already.

Remote session sounds like a good idea. What timezone are you from? I will be available for the next 3-4 hours.

On 12/19/2022 at 10:59 PM, Luke said:

You're using lots of custom ports, are you sure you didn't get any of them mixed up? What exactly did you enter into canyouseeme?

I am confident in the ports. I also made screenshots above for the settings. Pretty sure everything is correct.

I went to canyouseeme and entered whatever port we were testing (the remote http port that is configured in emby and in router port forwarding).

For additional testing I entered the port of my torrent client and syncthing.

On 12/19/2022 at 11:19 PM, Happy2Play said:

You tested making local/internal and public/external ports being the same?  

Can you post a server log as previous one does not show Emby listening on 8096.

Logs are attached.

Making local/external port the same doesn't sounds like a good idea?

Update: I tried it. Setting both to 8096 sticks in the settings but local will still only be accessable via the originally configured port. 8096 won't work via local/external still. There is no error message in emby when configuring both services (external and internal) to the same port.

 

Edited by Utini
  • Solution
Happy2Play
Posted (edited)
59 minutes ago, Utini said:

I am confident in the ports. I also made screenshots above for the settings. Pretty sure everything is correct.

Not according to your log.

Info App: Adding HttpListener prefix http://+:8205/

Your port forwarding needs to be internal 8205 not 8096.

 

So if I have this correct Emby Local is 8205 and Public is 58196 so Port forwarding should be external 58196 internal 8205 to 192.168.50.27

Probably need to verify firewall rule for 8205 also.

Edited by Happy2Play
  • Like 2
Posted (edited)
13 minutes ago, Happy2Play said:

Not according to your log.

Info App: Adding HttpListener prefix http://+:8205/

Your port forwarding needs to be internal 8205 not 8096.

 

So if I have this correct Emby Local is 8205 and Public is 58196 so Port forwarding should be external 58196 internal 8205 to 192.168.50.27

Holy moly.. that seems to have fixed it.

But I am still failing a bit to understand this.

Basically my router is now redirecting the external port to the internal port. Why do I even had to configure an external port in emby then if it doesn't get used anyway?

Edited by Utini
Happy2Play
Posted
3 minutes ago, Utini said:

Holy moly.. that seems to have fixed it.

But I am still failing a bit to understand this.

Basically my router is now redirecting the external port to the internal port. Why do I even had to configure an external port in emby then if it doesn't get used anyway?

Sure it does you are connecting to Emby via http://WANIP:58196 remotely but http://LANIP:8205 locally.

Posted
1 minute ago, Happy2Play said:

Sure it does you are connecting to Emby via http://WANIP:58196 remotely but http://LANIP:8205 locally.

So the external connection redirects to the local connection?

I know this is very off topic but:

I also set a custom port in xbox settings. canyouseeme shows "port closed" but xbox connection test says "success".

I forwarded the custom xbox port internal/external with the same port. Is there a fault as well then?

Happy2Play
Posted
2 minutes ago, Utini said:

So the external connection redirects to the local connection?

Correct

Not sure what you mean by xbox ports

Posted (edited)
3 minutes ago, Happy2Play said:

Correct

Not sure what you mean by xbox ports

Xbox also need ports to be able to play online with others correctly.

Usually it used port 3074 but I changed it in my xbox settings and also port forwarded (external only) to my new custom port.

Edited by Utini
Happy2Play
Posted
2 minutes ago, Utini said:

Xbox also need ports to be able to play online with others correctly.

Usually it used port 3074 but I changed it in my xbox settings and also port forwarded (external only) to my new custom port.

Network ports used by the Xbox network on the Xbox console | Xbox Support

Okay I don't know Xbox but does customize local and public ports or just local?

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...