WD Community

Portforwarding to my own web server in the same network with WDMyCloud

I have WDMyCloud 4T and it is connected to linksys wrt160n router.
WDMyCloud’s network mode is DHCP and no SSH, no FTP access. It works well but the problem is below.
I want to have my own web server in the same network using portforwarding so I set portforwarding to my web server in the router setting(external port : 55553 and internal port : 80).

So I expect that when I access to “http://externalRouterIP:55554” then my own web server page comes out but actually it isn’t.
When I access to “http://externalRouterIP:55554” then WDMyCloud web interface page(maybe dashboard?) comes out not my web server page.
Why dashboard of WDMyCloud comes out although I set portfowrding to my web server?

Hi hkseo, this type of access is not supported, but maybe other users an chime in and share their advice. 

Because you’ve forwarded external port 5555* to the internal port 80 which apache2 that runs WD’s Dashboard is listening. By right the path /UI/ is restricted to local subnet, so you won’t be able to see the WD WebUI if you’re accessing from external network.

You have two options (both unsupported by WD warranty):

  1. Configure your webpage path to listen to another new internal port other than 80/443 and point the external port to this new internal port.

  2. Configure your webpage path as a new virtual host and point the external port to internal port 80/443. This is the preferred method to run multiple websites on a single host.

According to your router manual, you can do Single Port Forwarding.

Just forward 55553 to the local IP of your designated webserver port 80.

I’m having a big issue with WDMyCloud (3TB) and I do hope that somebody can help me out here.

What I want to do is the following:

I’d like to access my WDMyCloud from work to synchronize files from my Macbook Pro (@work) with my local iMac (at Home). I’ve been using the tool “Syncovery” for more than a decade to do this, but I always have to carry around an external drive which I carry back and forth to and from work. So, now I want to do this job simply from work by using my WDMyCloud, or to put it succinctly:     MacbookPro (work) <-----> WDMyCloud (home) <—> iMac (Home)

Here is the issue: When I am connected to my WLAN at home, everything works. I can access all data and shares via ssh from a shell, I can set a ssh connection using Syncovery and it synchronizes everything just the way I want it. The problem is, when I try to do this from work (while not being in my personal WLAN at home), it never has any connection, it doesn’t work. Strangely enough, the WDMYCloud tool, where you have to pick every file by hand does work also from my workplace, so somehow this tool has a connection to my cloud at home, but I cannot access it via ssh (or ftp) from a shell, and also the Dashboard does NOT work from my workplace. I just don’t understand what I’m doing wrong or what I might be missing here, and many people in this forum don’t seem to have trouble accessing their cloud via ssh from a shell.

Any idea why this isn’t working for me?

(Of course, ftp and ssh are both enabled, I also issued a port forwarding on my router for external ports 21-22 to the local ports 21-22 of the WLAN address of my WDMyCloud, i.e. 19x.xxx.x.xx. Was this wrong? Without any port forwarding it didn’t work either. It doesn’t make a difference. What the **bleep** am I’m doing wrong? This is really annoying me, because this is supposed to work and should actually be very easy to setup.

Any ideas or fingertips ?

@WDCloudUser,

First of all you’re right, Dashboard won’t work outside your subnet unless you change the apache2 settings which is not supported by WD.

Secondly, you need to ensure your port forwarding setup works. You don’t have to be at work to test, from home (where your cloud is) just ssh or ftp to your external ip followed by the port that you forwarded. If works, then it could be standard ftp:21/ssh:22 ports are being blocked at your workplace. Try other external ports may be? Like ftp:2121/ssh:2222.

Hi Nazar78,

I’ve done what you suggested and always get the following:

ssh: connect to host xxx.xx.xx.xx port 22: Connection refused

I’ve tried randomly other ports with the same result. So, does that mean ports 22/21 (or virtually ALL ports) are really closed at my workplace?

What I CAN do at work, is, e.g. connecting to a server from my laptop via ssh (when being in my work-WLAN), but obviously not from home, i.e. from outside my network at work.

So, does that mean, there is no way I can use my WDMYCloud from my workplace ?

Hi Nazar78,

just another comment, because I just don’t get, why the WD MYCloud App which I’m using on my Macbook Pro DOES connect and access all my data on my WDMYCloud at home. So, how is it possible, that this tool gets a connection, but when I try the same via ssh or ftp from a shell from the same Macbook with the same IP address from work, it always fails?

Is that WD app connecting some other server somewhere and only then connects to my home network, so that this is not the same as if directly trying ssh from my Macbook at my workplace.

I just don’t understand how this can be.

Do you get this ?

I appreciate any help here.

Hi WDCloudUser,

Based on your findings, I think there is less or no restriction at your workplace. So you need to look further in your router setup.

The WD app connects from your workplace to your home network through a port automatically opened by WDMyCloud device in your router via upnp, usually port http:9080/https:9443 if you have it as default and upnp is enabled on your router.

To solve your issue, we need to know more about your router (brand/model) and its setups (screenshots of the port settings? Cloud’s internal IP). I’m sure your router supports upnp, and if it does and enabled you will have IGD settings such as below screenshot on Windows (sorry am not a Mac person), which you change or test the port forwards. But note these upnp are temporary leased, it will be lost once your router restarts. Best still have it setup in your router’s GUI.

  

Things just to confirm:

  1. Your external IP, check from your home browser,  http://checkip.dyndns.org:8245/. The port 8245 will ensure you’re not checking behind web proxies which would reflect your ISP proxy’s IP.

  2. Your cloud internal IP:

    nazar@TeaNazaR4TB:~$ hostname -I
    192.168.1.18

 3. In your router setup, the port ftp:21/ssh:22 is correctly forwarded to the cloud internal IP. No duplicate rules, double check existing rules. And that you’re accessing the correct external IP ie. ssh root@my-external-ip.

Do you have other external means of testing other than your work place? eg. Macbook tethering to your mobile network? As I mentioned before, if the setups are done correctly, you should even be able to ssh to your external IP within the cloud itself (yes ssh to your cloud at home, then in the cloud session ssh to your external ip, if you can’t then it’s the router setups).

TO Nazar78:

Many thanks for your competent help so far. I’ve made big progress, but still can’t connect from my workplace.

Let me tell you what I did and found out:

  1. First of all, my Router settings you can see in the provided snapshot: UPnP is enabled

 2. Secondly, the port forwarding: IT WORKS ! (snapshot 2)

 

A question about the protocol: There is a second protocol available, I think “UDPn” or something like that. Can I enable both or do I really ONLY need TCP ?  Would it mess up things if I enabled both?

  1. So, now the interesting part:

I did what you suggested and figured out my EXTERNAL IP ADDRESS OF MY ROUTER with the link you provided, lets say, it is XX. I then connected from my home WLAN to an external net via VPN connection. (I cannot connect to the LAN of my workplace from home. I don’t know how to do it and I think its not possible from outside). From there I now typed in a shell: ssh root@XX and voilá:

I was asked for my password. First, I tried the password of my Router which didn’t work and then the one of my WDMyCloud and it worked! I GOT CONNECTED. Then I connected from WDMyCloud back to the external IP-Address of the VPN connection and from there back again to my router IP-address (which is obviously forwarded to my WDMycloud) and I could connect again to my WDMYCloud! Then I did the command: ssh root@MySecondCloud where MySecondCloud is the local, internal address of my second WDMyCloud (2TB) which I also have connected to my Router, and it also worked !

So, all in all, I can connect from the external VPN connected network back to my Router @ home! Plus, I can also use now MySecondCloud by forwarding for example port 2222 to the local IP of MySecondCloud in the router and it worked, too !!

Here is a snapshot of the shell I used to do this (in the early morning hours): (please continue after the picture).

So it seemed that finally EVERYTHING would work exactly as I want it. I have then (still at home) issued the ssh command from the tool syncovery (but this time using the EXTERNAL IP ADDRESS OF MY ROUTER). Before, I had always used only the internal WLAN address! So, now the connection and synchronizing works at home, when I am within my local WLAN, but ALSO from external access when I am connected to a network outside my WLAN via VPN connection. PERFECT !!

  1. Now comes the dissappointment:

Right now, I am at my workplace again, and use the very same settings of the shell and within my syncovery tool to do the connections and the synchronization AND IT ALWAYS FAILS !

For example, when I type in the shell (which worked from home when using the external VPN-connected network previously): 

ssh root@XX(my external RouterIP)

I always get:

ssh: connect to host XX port 22: Operation timed out

When I do

PING XX (XX): 56 data bytes

I get 

Request timeout for icmp_seq 0

Request timeout for icmp_seq 1

Request timeout for icmp_seq 2

Request timeout for icmp_seq 3

SO, as a result it still DOES NOT WORK FROM MY WORKPLACE !

NOW THE WEIRED THING: From my work I can also connect to the external network via VPN. WHEN I DO THIS EVERYTHING WORKS, just like it did from home. The connection is there, I can login, I can use syncovery for synchronizing, etc.

  1. Now, the thing is, I don’t want to have to connect to the other external network (also external to the LAN at my work) via VPN all the time when I want to do (fully automated) synchronizations of my data. (also, I might not have that account anymore in a year or so and then I would be in trouble again). SO, do you have any idea what’s happening here? Why does it obviously work from the external VPN network and then probably from any computer in the world that is connected with the internet, but just not when I am connected to my local LAN at my workplace ? Is probably the policy at my workplacew so restrictive that NOTHING is Allowed ? I cannot believe this, because then I don’t understand still, why the connection via http and https with the WDMYCloud App still works from my workplace (also, when NOT being connected via VPN). So, could I maybe exploit the fact, that this App obviously gets a connection by using, or rather, re-directing ports 80 and/or 443 on my router, so that I could try to connect with snycovery via ssh using some port such as 2222 and then re-direct this to port 80 on my local MyCloud?  It seems to me, that via shell I just don’t get ANY connection to the outside world from my LAN at work. Could this be the case ? 

ANY IDEAS how I could proceed from here to check what’s going on with my LAN at work and finally get to what I really want, namely synchronizing everything with WDMyCloud at home when I am connected in the LAN@work ???

I appreciate any help & ideas ! (you’ve been of great help so far! Thanx a LOT for that already)

For your 2nd point, you only need TCP.

Edited: 

For your point 4 onwards, seems for ssh, you’re only able to reach out to your VPN from your workplace to connect back to home where cloud resides. If this is the case, then definately it could be your workplace network doesn’t have the network route to your home external ip. Cos you can’t even ping the cloud external IP from your workplace (or home router droping ICMP packets?).

But then I do find it strange that your workplace allows non-standard ports to be routed out, as for this case, the port https:9443 used by WD app. Also that you’re enable to connect to your VPN from your workplace.

Your ideas mentioned in your point 5 might work, though you will then need to manually reassign a different port for the WD app to work. But I see there’s hope because you’re able to connect via VPN and WD app from your workplace. If you’re interested in resolving this by all means, lets start.

  1. Which port does your VPN use to connect from your workplace?

  2. Then in your home router, port forward the port you got above (1) lets say TCP 1723 to your cloud internal SSH 192.168.1.16 TCP 22.

  3. From your work place, SSH to your router external IP through this port i.e. ssh -p1723 root@123.123.123.123.

  4. If above doesn’t work, PM me your external IP and let me test. Prior, ensure port 22 is port forwarded to your cloud. I’m in the GMT+8 zone.

Support for Western Digital Hard Drives | Western Digital

Still Need Help?

Reach out to Support for more assistance.

Sign in to Your Support Account

Get up-to-date information about your products.

Western Digital Business Portal

Unlock benefits and tools for your business such as enterprise support, pricing and rebate tools, marketing, loyalty, rewards, and more.