Access server from some ISP


I built a server on Ubuntu 20.04 and installed Plex, Nextcloud and Wireguard.

It works almost perfectly, thank you Xiao for all the tutorials.

I’m facing a problem since months and made a lot of research on internet without finding the solution.

My problem is that I cannot connect to Plex, Nextcloud and also Wireguard from certain network. If I use a VPN like ProtonVPN it works. The problem seems to be linked to the public Ip from the client side.

Finally I think that it is linked to the fact that the client and the server have the same public default gateway.

My server public IP: A.B.C.056 with default gateway on A.B.C.1
The client public IP: A.B.C.125 with default gateway on A.B.C.1

Could it be the problem? And can some help me, I’m turning crazy.

Thnak you in advance


I have also tried from a friends wifi with same ISP
His public IP: A.B.C.074 with default gateway on A.B.C.1
–> It doesn’t work

My two friends and me have the same ISP and live in the same area. First I tought that the ISP was the cause but from two other friends wifi with same ISP it works properly. (They live not in the same area and their puiblic IP is totally different.)

I have discussed at work with our IT manager and he confirmed that the problem is most probably due to the fact that the public default gateway are the same.
He propose to set a route on the client side.

I’ve tried to route as follow:

A.B.C.056/32 to A.B.C.056 in order to avoid gatway conflict but it doesn’work.

I will continue my investigation and hopefully can find a way to fix it

I doubt the default gateway has anything to do with your issue. If im understanding your setup correctly (which I may well not be), it’s probably that your IP address from your ISP is somehow blacklisted by plex etc. and possibly your ISP is blocking certain connections within your connection. But again, your setup is not very clear.

Could you please revise and properly explain your configuration here? Some questions that come to mind that require elaboration are…

What are you running the vpn client on? The ubuntu server or another box?
What is your vpn client connecting to when it connnects with plex access sucessfully/unsuccessfully?
When you say “you cannot connect to plex from certain network”, what exactly does that mean? What networks are you attempting to connect from?
When you say “If I use a VPN like ProtonVPN it works”. What exactly works? Connecting to your plex server from a computer with a protonVPN Ip address? Or are you using protonVPN on your server somehow?

Please elaborate on your setup and what you are trying to do in order to get more valid responses. This is a very confusing post.


Thanks Danran for your reply.
I don’t think that my public IP is blocked by PLEX etc, as it works from every other networks that I tested. Except from my two friends who live in the same area and have the same ISP (With a very similar plubic IP address and same public default gateway).
According to the phone that I had with my ISP, they don’t block any connection so I also should not be the root cause.

  1. The client VPN is running on my android phone. It works in every networks but again except from my two friends. It is exactly the same for Nextcloud and Plex.
  2. As I opened the port 32400, I don’t use my VPN to connect to PLEX
  3. Plex indicated that I’m not directly connected to the server. It means that is use the Plex relay and with limited connection (1Mbit/s). This occurs when I try to connect from my two friends networks.
  4. If on the client side I connect to ProtonVPN from my two friends networks, every think work normally (Plex, Nextcloud). This means that with another public IP (the one provided by ProtonVPN) it works without issue.
    Hopefully, my answers are enough clear and it is less confusing know.

To determine if public default gateway is the problem, you can do a traceroute on the client.

Use a client running Linux (A.B.C.125) and install the traceroute utility.

sudo apt install traceroute

Then you can do a traceroute to the server public IP address with the following command.

traceroute A.B.C.056

Post the command output here.

Hi @ thierry
May I ask what DNS are those PCs using? Did you try to change that?

I didin’t had the opportunity to test your proposal because in the meantime, my ISP changed my public IP (outside of the range of my friends) and since that it works. This probably confirme the root cause of my problem.
Now the question is how to avoid this issue to occur again?

PS: I have and as DNS in my router settings