SOLVED

How do i get two volumes to be accessible remotly via FTP on one IP?

Copper Contributor

Hi all,

 

New here, so really grateful for the help. I'm quite new to Windows server so go easy on me. I'm trying to make two of my storage pools acessable remotely. My first on via my private adress on port 21 works great on LAN and remotly. The second one i just cant work out.

 

Ive tried for the second pool:

               Creating a port on 22 (in FTP, firewall and my router)

               Using my public adress in FTP

               Tried using Virtual Host Name (yet im confused as to what this should be)

 

Can anyone help or point me in the right direction?

 

Many thanks.

5 Replies
Greetings Pickles. As you probably know, FTP is an old school protocol which was designed with the assumption that either the client (in active mode) or server (in passive mode) has a public IP address and can open multiple ports. To deal with that limitation, routers typically rewrite the IP address and ports within the FTP protocol, which is standardized on port 21, and what I would guess is why it works on 21 but not on 22.

Since it does work on port 21, you can utilize the Virtual Host Name feature you've already mentioned. The key to connecting using that feature is to add whatever virtual host name you choose to the username when logging in with the format: `hostname|username`. You'll find this documented on MS Docs with a better example:
https://docs.microsoft.com/en-us/iis/publish/using-the-ftp-service/using-ftp-virtual-host-names-in-i...

The rest of the MS Docs article might possibility cover some other questions too. Depending on your scenario, there may be other protocols you might consider, but I admit most of them have some annoying limitations, no nice GUIs, and/or no nice Windows/Explorer integration like the FTP support does (at least without third party software).

@Jonathan Kay 

 

Thankyou so much for your response. I have tried everything on that site before hand and it wont work, so at least im not going mad!

 

When i set the FTP up as 192.168.xx.xxx:21

then type into explorer ftp:\\192.168.xx.xxx              its fine (but obviously i can't have two drives)

if i type ftp:\\192.168.xx.xxx:21                                  its not fine (it says windows cannot find this folder)

 

When i set the FTP up as 192.168.xx.xxx:21:VirtualName        

then type into explorer ftp:\\192.168.xx.xxx            its not fine (it says windows cannot find this folder)

if i type ftp:\\192.168.xx.xxx:21                                its not fine (it says windows cannot find this folder)

 

So whenever i add a Virtual name i dont get the connection for the login box to log in. For some reason the very presence of the virtual name wont allow me to connect or even 'see' the FTP.

 

What am i doing wrong?

 

And once again thanks so much.

best response confirmed by Pickles (Copper Contributor)
Solution

@Pickles 

Before getting into more, I neglected to mention that if you haven't already found them, there are log files for the IIS FTP Server.  The default location is \inetpub\logs\logfiles and the folder names begin with FTPSVC.  You can find the exact location by going to the FTP site in the IIS Manager, going to FTP Logging, and pressing the View Logs... link from the right-side Action menu. Given what you've said so far, I expect the USER and PASS commands are what you're most interested in checking.  As you debug more, this may provide some hints as to if it's actually connecting or sending the right username, etc.

 

The format you're using for the FTP port should be fine (ie. ftp://192.168.0.1:21).  However, your syntax for the virtual names feature is incorrect, the virtual name is part of the username with a pipe character.  For example, if I have two FTP sites, one is named blue and the other is named pink, both on port 21, 192.168.0.1, and my username is jon, to access the blue site I would type into Explorer:

ftp://blue|jon@192.168.0.1

You should get a prompt for a password and then be allowed to login.  To access the pink site:

ftp://pink|jon@192.168.0.1

and so on.

 

If your password is not accepted, I would verify that the site(s) that don't work have Basic Authentication enabled in the FTP Authentication section of each in IIS Manager.

 

If you're still having problems, I would recommend you continue testing by using localhost instead of the IP (ie. ftp://pink|jon@localhost) from the server itself (if you weren't already), as you may be trying to solve multiple problems at once, and one problem at a time is usually recommended.

 

As a side note unrelated to the problem, just in case you're not aware, on any client (or the server if you really wanted), if you go into This PC/My PC/My Computer (whatever it's called on whatever version of Windows you're using), right-click in an empty area, choose "Add a network location", and add the FTP link that you're typing into Explorer into the wizard, it will generate a shortcut that will appear alongside your drives in Explorer and any common file dialogs.  Then it's easily accessible via an icon in any application.

 

 

 

 

@Jonathan Kay 

 

You, my friend, are the stuff legends are made of.

 

ftp:\\virtualhostname|thispcusername@privateIP for local

and

ftp:\\virtualhostname|thispcusername@publicIP for remote

 

worked perfectly.

 

Its amazing (unless I'm a little slow and can't read) this nugget of information is not to be found in microsofts documentation. It states the pipe seperation betwwen VHN and username but not  @IP at any point.

 

I didn't mention it before but I'm in my late 30's and never used forums before for support, I've just slowly figured things out on my own. Definately using the forum again.

 

Would love to buy you a pint sometime (I'm english, it's the done thing)

 

Thanks for your time, knowledge and help

@Pickles 

 

Thought I'd add something to help others.

 

If you use the address stated above in explorer it works perfectly but for some reason you can't map to it with that address in the wizard. 

 

What worked for me is if you log in via explorer then right click and properties you can use the location address (which seems like a distorted version of the origional) for the adress to map the drive.

1 best response

Accepted Solutions
best response confirmed by Pickles (Copper Contributor)
Solution

@Pickles 

Before getting into more, I neglected to mention that if you haven't already found them, there are log files for the IIS FTP Server.  The default location is \inetpub\logs\logfiles and the folder names begin with FTPSVC.  You can find the exact location by going to the FTP site in the IIS Manager, going to FTP Logging, and pressing the View Logs... link from the right-side Action menu. Given what you've said so far, I expect the USER and PASS commands are what you're most interested in checking.  As you debug more, this may provide some hints as to if it's actually connecting or sending the right username, etc.

 

The format you're using for the FTP port should be fine (ie. ftp://192.168.0.1:21).  However, your syntax for the virtual names feature is incorrect, the virtual name is part of the username with a pipe character.  For example, if I have two FTP sites, one is named blue and the other is named pink, both on port 21, 192.168.0.1, and my username is jon, to access the blue site I would type into Explorer:

ftp://blue|jon@192.168.0.1

You should get a prompt for a password and then be allowed to login.  To access the pink site:

ftp://pink|jon@192.168.0.1

and so on.

 

If your password is not accepted, I would verify that the site(s) that don't work have Basic Authentication enabled in the FTP Authentication section of each in IIS Manager.

 

If you're still having problems, I would recommend you continue testing by using localhost instead of the IP (ie. ftp://pink|jon@localhost) from the server itself (if you weren't already), as you may be trying to solve multiple problems at once, and one problem at a time is usually recommended.

 

As a side note unrelated to the problem, just in case you're not aware, on any client (or the server if you really wanted), if you go into This PC/My PC/My Computer (whatever it's called on whatever version of Windows you're using), right-click in an empty area, choose "Add a network location", and add the FTP link that you're typing into Explorer into the wizard, it will generate a shortcut that will appear alongside your drives in Explorer and any common file dialogs.  Then it's easily accessible via an icon in any application.

 

 

 

 

View solution in original post