Jump to content

Remote access and Mullvad VPN


mdelsesto
Go to solution Solved by Carlo,

Recommended Posts

mdelsesto

Hello,

I have an OpenWrt router with a Wireguard interface connected to Mullvad. My emby server is on a device on my LAN.

I opened a port in Mullvad and changed the port for Remote Access on the emby server to match that port, but I still can't connect remotely.

FWIW i also host a VPN to connect to my LAN when i am remote, and I am able to do that without issue, so i have a test case where port forwarding is working in my environment.

Emby ports forwarded on my router:

 

image.png.78338ca477ecc56bfa0e7ae2a3dee23c.png

Any assistance would be very welcome, thanks for reading

Link to comment
Share on other sites

Gilgamesh_48

Disclaimer: I do not and have not, except for a brief test, used remote access. 
That VPN is also basically unknown to me but I have heard of it and it receives mixed reviews around the internet. The one thing that always shows up is that it is cheap and I distrust when that is one of the first things mentioned in reviews.

I use and recommend Express VPN due to many reasons but price is not one of them. Often the phrase, "You get what you pay for," is more than a little true. When I tested, a couple of years ago, with ExpressVPN I got remote access working pretty easily but I had to do nothing special.

However I recommend troubleshooting in steps:
1. Get it working with no VPN at all.
2. Add the VPN and its features one at a time and get each part working before trying the next.

If you want more help I would suggest you include logs from everything involved as there are people here, not me, that can read logs and see what is going wrong. 

Other than those limited suggestions I cannot help much but there are others here that have a pretty great understanding of the mysteries of VPNs and remote access one other obscure magical functions of the computer world. @cayars may have more expertise or may know of someone else that can help. It often seems that he knows everything about the most obscure and arcane areas of the computer world.

Edit to add Mullvad VPN is not really a lot cheaper than Express VPN Mullvad is about $81.50/year and express is about $100.00/year. That is a difference of only $20.00 and for that you get more stability and a LOT wore servers worldwide.

Edited by Gilgamesh_48
  • Like 1
Link to comment
Share on other sites

  • Solution

@mdelsesto I've not hear of Mullvad VPN before but they all work 90 to 95% similar to each other.

So let me recap a couple of things you mentioned.  You're running VPN on the router itself and not on the Emby Server computer/device correct?

The port you have opened 9040 & 13030 aren't ports that Emby Server will be able to access as they use ports 8096 and 8920.
Thus you need to get those ports opened via the VPN OR maybe (depending on Router) can setup port forwarding of 9040 to 8096 pointing to your Emby Server.  Same with 13030 pointing to 8920 on your Emby Server.

One way or another you have to ROUTE the packets from 9040 to 8096 and 13030 to 8920 so Emby Server will receive them.
The remote/public port section in Emby Network menu don't actually change the ports being listed to but append the port to the URL.  Then on the incoming connection your router does the forwarding so it matches Emby Settings.

If this doesn't make any sense to you or seems over your head let me know and I can likely help you via a remote session to get this worked out.

Also you said "device" vs Computer so I'm wondering what do you have Emby Server installed on?  PC, Shield TV, NAS???

 

Edited by cayars
Link to comment
Share on other sites

mdelsesto

Thanks @cayars Can you confirm the port settings in Emby Dashboard are only for show? I did not realize that, i will have to set up the port forwarding a different way then. And yes, I did follow that guide on Mullvad's website.

Edited by mdelsesto
Link to comment
Share on other sites

8 minutes ago, mdelsesto said:

Thanks @cayars... Can you confirm the port settings in Emby Dashboard are only for show? I did not realize that, i will have to set up the port forwarding a different way then.

No they are not for show in any way.  These port settings tell the Emby Client or browser what port to send the transmission to.

So for example a browser could be opened to my Emby Server on port 443.  I have port 443 set as the public SSL port in Emby.
I have my router setup to forward the WAN port for 443 port to my Emby Server IP on port 8920.  So 443 on wan goes to Emby on port 8920.
Now since I have 443 set in Emby it APPENDS this port to any response messages.

The Client now gets a response from the Emby server with a return port of 443.  It responds to 443 and my ROUTER port forwards this 443 on the WAN port to my Emby Server on port 8920 and so on.

So not for looks at all but you need PORT FORWARDING if not using ports 8096 and 8920 specifically on your VPN connection.
Does that make sense?

So the Emby public port needs to match your open port AND you need to forward that port to Emby as either 8096 (non SSL) or 8920 (SSL) ports.

Again if you're stuck we can help you remotely.

Edited by cayars
Link to comment
Share on other sites

mdelsesto
3 minutes ago, cayars said:

No that are not for show in any way.  These port settings tell the Emby Client or browser what port to send the transmission to.

So for example a browser could be opened to my Emby Server on port 443.  I have port 443 set as the public SSL port in Emby.
I have my router setup to forward the WAN port for 443 port to my Emby Server IP on port 8920.  So 443 on wan goes to Emby on port 8920.
Now since I have 443 set in Emby it APPENDS this port to any response messages.

The Client now gets a response from the Emby server with a return port of 443.  It responds to 443 and my ROUTER port forwards this 443 on the WAN port to my Emby Server on port 8920 and so on.

So not for looks at all but you need PORT FORWARDING if not using ports 8096 and 8920 specifically on your VPN connection.
Does that make sense?

Again if you're stuck we can help you remotely.

Ok, that does make some sense! How does my port forwarding look here? How can we set up a remote session? I really appreciate the help here.

edit:.101 is the emby server .. WGOUT is Wireguard/Mullvad

image.png.ce0318f1e2096d8095f486f0146406e1.png

Edited by mdelsesto
Link to comment
Share on other sites

mdelsesto

Also FWIW, my Emby server has been working wonderfully remote for some months now, i just introduced Mullvad to the equation this morning.

@cayars @Gilgamesh_48 @Luke
EDIT: This is working now, thank you so much!

Edited by mdelsesto
Link to comment
Share on other sites

I've not used this VPN before but the forwarding at first glance looks correct to me.

Now In Emby Server on the Network menu scroll down and make sure you have this:
image.thumb.png.8b8650e54593bb774f6470fa4e0cf564.png

These are the PUBLIC ports.

Do you have those setup?

Link to comment
Share on other sites

mdelsesto
Just now, cayars said:

I've not used this VPN before but the forwarding at first glance looks correct to me.

Now In Emby Server on the Network menu scroll down and make sure you have this:
image.thumb.png.8b8650e54593bb774f6470fa4e0cf564.png

These are the PUBLIC ports.

Do you have those setup?

Yes, exactly. That along with the port forwards posted above was the fix. Thanks again!

  • Like 1
Link to comment
Share on other sites

5 minutes ago, mdelsesto said:

Also FWIW, my Emby server has been working wonderfully remote for some months now, i just introduced Mullvad to the equation this morning.

@cayars @Gilgamesh_48 @Luke
EDIT: This is working now, thank you so much!

Perfect, Glad you got it working!

Link to comment
Share on other sites

Do you have a good understanding of this now and how the port forwarding and Emby PUBLIC port settings go hand in hand?
Just in case you ever have to change it.

Link to comment
Share on other sites

mdelsesto
1 minute ago, cayars said:

Do you have a good understanding of this now and how the port forwarding and Emby PUBLIC port settings go hand in hand?
Just in case you ever have to change it.

Yes, i had to read it a few times. It feels a bit like a reverse proxy to me.

Link to comment
Share on other sites

It's similar and can be as confusing as a reverse proxy setup. :)

I'm reworking our remote connection setup instructions in our Knowledge base articles to streamline a basic setup but then also add sections for advanced setups like this with VPN using completely different ports or a Proxy server or Cloud Proxies like Cloudflare.

The major "trick" is just understanding the correlation of Emby's PUBLIC PORTS and how they relate to the router or proxy being used and what port they receive info on before forwarding to Emby's own 8096 and 8920 ports.

If it's any consolation, you're now in the Emby 90% networking understanding percentile. LOL

Let us know if you have any other issues or if we can be of any additional assistance.

  • Like 1
Link to comment
Share on other sites

  • 4 months later...
oceanclr

Hi, I ran into this thread after setting up my server just the way it is described here (Jellyfin in my case).
Please understand, I'm a self-taught linux user, and am extremely new to installing servers.

Having said that, here's my question first:
- Can I access my server via mydomain.com to Jellyfin without attaching a port number at the end?
- Currently I'm able to access mydomain.com:58008 but I wish to access mydomain.com without adding a port (guessing the default port 80 http or 443 https based on my research thus far)
- I believe this is so because Mullvad currently assigns ports randomly due to them reaching limits (please correct me anywhere I'm wrong in my understanding)

My understanding tells me:
- If I choose a VPN service with all open ports (e.g. ProtonVPN), will I be able to access my Jellyfin server via mydomain.com via browser without adding a port number?

Thank you in advance,

Ocean

Edit: I cannot test on my ISP as I use an LTE modem and I believe it's already behind a NAT (took me a while to understand all of these). Thus, my only option to access my media server via mydomain.com is to have a VPN. Please enlighten me if there's a better way to solve my situation.

Edited by oceanclr
Added
Link to comment
Share on other sites

Hi, I'm not sure why you are asking Jellyfin questions here at Emby support forums. But I can answer your questions regarding Emby.

Emby will allow you to use any ports you want so you could use port 80 & 443 (with a cert) and allow browser access without the need to enter a port number. However if you require the use of a VPN for inbound access (ie ISP uses CGNAT) and you use VPN port forwarding then you have no choice but to use the port assigned to you by the VPN provider.

Link to comment
Share on other sites

oceanclr

Thank you, that answers the question I wondering for some time.

The settings in Emby & Jellyfin seemed very similar and the original question was exactly the problem I was struggling before; couldn't help to cease the opportunity.

Link to comment
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...