D-Link Forums

The Graveyard - Products No Longer Supported => D-Link Storage => DNS-323 => Topic started by: william.walker87 on February 17, 2010, 09:52:35 AM

Title: Help with FTP please.
Post by: william.walker87 on February 17, 2010, 09:52:35 AM
Hi everyone, this is my first post on here so bear with me.

First what I am wanting to accomplish. I live in Hawaii now (just got out of the military and they stationed me here) and all of my family and friends are scattered throughout the mainland. I would like to be able to place all of my pictures and videos and other files so as I can give other of my choosing access to them over the internet. Sounds a lot like FTP right?

My setup: Clearwire Modem
               WNR2000 Router (netgear)
              D-link DNS 323
              On my network now I have a Vista 32bit machine, XP Machine, WiFi Printer, PS3 and then the various odds and ends, e.g., psp, wife's itouch, guests machines, phones that sometimes connect via wifi.

The NAS box said it could be used with ftp but I cant figure it out. I also setup a profile on the dlinkddns.com site and now everytime I go to the website they gave me the CPE GUI pops up. I was hoping (kinda still am) that there is a way to do this without setting up a static IP address. I have tried reserving an IP for the NAS but no dice.

Basically guys I am at my wits end, even though I know it is probably really easy to do if I would stop being cheap and get a static IP through my ISP. Any help would be greatly appreciated and thanks in advance.
Title: Re: Help with FTP please.
Post by: Wiggs on February 17, 2010, 11:24:07 AM
You don't need a static IP from you ISP... that is what the dlinkddns.com is for - it tracks your dynamic IP from your ISP so that you only have to point to the dlinkddns.com.


The FTP is setup under "Advanced" or "Tools" (I can't remember - I will check when I get home).  You will have to forward port 21 from your router to the DNS323.  For this the DNS323 will need a static IP in your home network.  This is setup in the web GUI (again, I can give more detailed info when I get home).

This is how you should start. 

Regards,

Wiggs
Title: Re: Help with FTP please.
Post by: Wiggs on February 17, 2010, 11:32:43 AM
OK... I found the emulator online.

You need to set the DNS 323 to a static IP for your internal network ("Setup" -> "LAN").  Select Static IP and set this to something that is not in the DHCP range of your router. 

To Start FTP ("Advanced" -> "FTP Server").  You need to set up users as well.  This is also done under the "Advanced" Tab. 

Hope this helps.

Wiggs,
Title: Re: Help with FTP please.
Post by: william.walker87 on February 17, 2010, 08:15:17 PM
Wiggs, thanks for the help. I am no able to successfully open up the NAS in a browser via FTP..this is only in my LAN. When I entered a different network and tried connecting to the NAS I was only able to get a timed-out connection. Any ideas? There really should be an easier way to do this.
Title: Re: Help with FTP please.
Post by: fordem on February 18, 2010, 04:26:10 AM
Will.

Focus first on getting ftp working on the LAN - if it's working there it won't work from a remote site - taking a step by step approach makes the process a little easier.

These are the basics steps.

1 - Set a static LAN ip address on the DNS-323 (or a DHCP reserved address) - this is so that you will always know where to look for it.
2 - Configure at least one user on the DNS-323 and then give that user ftp access to a folder & start the ftp server
3 - test for local access.

If you're going to use your browser for ftp access you need to enter the address of the ftp server like this - ftp://aaa.bbb.ccc.ddd - where aaa.bbb.ccc.ddd is the LAN address you gave the DNS-323.

After you have ftp working on the LAN, we can add the remaining steps to get it working remotely.

Now - I don't know how "network savvy" you are - each of the three steps I have outlined can be considered as "blocks" and further broken down into individual steps, Wiggs has covered some of them, if you need help with them let me know.
Title: Re: Help with FTP please.
Post by: william.walker87 on February 18, 2010, 01:57:05 PM
Fordem,

Thanks for the steps. Last night I was able to get access within my LAN. This is good. Now that I have that working I am half happy because I know that I am on the right track. So now I need to figure out how to get from my the internet and access my ftp.

If I go to my browser (while connected to my own network) and type ftp://xxx.xxx.xxx.xxxx:portnumberhere I see my NAS. However, if I type thisismyurl.dlinkddns.com I get nothing.   

If I connect to a different network and try the same addresses (I also tried having my mom get into from VA) then I get a timed out error. I can only GUESS that I need to somehow configure my modem to accept a connection from the internet to my LAN. I dont know how to accomplish this though.
Title: Re: Help with FTP please.
Post by: gunrunnerjohn on February 18, 2010, 03:55:03 PM
Can you ping thisismyurl.dlinkddns.com?  If so, what IP address does it resolve to?
Title: Re: Help with FTP please.
Post by: fordem on February 18, 2010, 05:09:35 PM
Fordem,

Thanks for the steps. Last night I was able to get access within my LAN. This is good. Now that I have that working I am half happy because I know that I am on the right track. So now I need to figure out how to get from my the internet and access my ftp.

If I go to my browser (while connected to my own network) and type ftp://xxx.xxx.xxx.xxxx:portnumberhere I see my NAS. However, if I type thisismyurl.dlinkddns.com I get nothing.   

If I connect to a different network and try the same addresses (I also tried having my mom get into from VA) then I get a timed out error. I can only GUESS that I need to somehow configure my modem to accept a connection from the internet to my LAN. I dont know how to accomplish this though.

Will - for now - set things up to use the standard ftp port - port 21 - so that you can connect on your LAN using ftp://xxx.xxx.xxx.xxx - using non-standard ports just complicates things, we'll use the standard ports for now.

Next - IE defaults to something called passive ftp - which you probably are not configured for (yes, I know it works fine across the LAN, but it won't from the internet) so we need to tell IE not to use passive ftp.

Find internet options, select the advanced tab, and scroll down until you find the box for passive ftp and uncheck it and then click apply.

Now try accessing from the internet again.

If this does not work we need to look at two things - your dlinkddns settings and your port forward settings - gunrunnerjohn has shown a way to test the dlinkddns settings.
Title: Re: Help with FTP please.
Post by: gunrunnerjohn on February 18, 2010, 05:39:51 PM
You might want to consider FileZilla for an FTP client, it works well with most FTP servers, including the DNS-323 one.
Title: Re: Help with FTP please.
Post by: william.walker87 on February 18, 2010, 06:15:51 PM
gunrunnerjohn-- I pinged the address and it came back with 192.168.xxx.xxx which turns out is my router. I had FileZilla on here before and it works great, just not with mine lol.

Fordem-- First of all, Gunrunner and yourself, thank you both very very much. I changed my ports to the default (21) and tried two things.

1. Tried from within my LAN with IE setup the way you said to. It asked me for a username and password, which is a first.

2. Tried from outside my network and got nothing once again. I tried IE and chrome (which sucks for FTP by the way) both to no avail.

Ideas?
Title: Re: Help with FTP please.
Post by: Wiggs on February 18, 2010, 07:41:01 PM
When you ping thisismyurl.dlinkddns.com you should not be getting an IP that starts with 192.XXX.XXX.XXX - this is the IP of you internal network. 

If you go to http://www.whatismyip.com/ it should show you what the http://www.whatismyip.com/ should be returning for an IP address.  This is your EXTERNAL address that is accessible outside your internal network.

Wiggs,
Title: Re: Help with FTP please.
Post by: william.walker87 on February 18, 2010, 10:14:01 PM
Wiggs,

Thanks and I am well aware of this and wish I knew how to fix it. If i take my external ip and try to go to it from over the internet all I get is the GUI for my actual modem (clear wimax modem by motorola.) with the following options:
1: Personalize (password, Device Time, Devince Name, Restore factory settings.
2: Internet (WiMax Security, Internet Protocol, Firewall with a bunch of things I cant change, and DDNS
3: Status (current status of everything).
4: Port Forwarding: Basic which includes DMZ Ip Address, and Port forwarding with options to set a protocol (TCP/UDP) WAN Port Start/End, LAN Port Start/End, and LAN IP address

Forwards inbound connections destined to ports on the WiMAX interface, to a specific client on your local network. You can specify a corresponding destination LAN port range as well. Port forwards can be used to support a web server, or other special service, offered on your local network

5: Local Address: DHCP Server, Lease Reservation, and Lease Status
6: Control Panel: which has the certificates, about, and all that stuff.

Seeing as how I think that the problem is somewhere inside the modem and not the router or the DNS (simply because if I use my external/WAN/Over the internet IP address it takes me to the log-in page for my modem.

Hope this helps someone help me.
Title: Re: Help with FTP please.
Post by: fordem on February 19, 2010, 04:28:18 AM
Will - let's start by checking what your Netgear router thinks it's public ip address is - login to the router and see if it shows up as a 192.168 address.

If it does - it indicates that you have something in the router/modem area that needs to be resolved.

Looking at the info you have provided it seams that the "clear wimax" modem is actually a modem/router and that will complicate things somewhat - find out from the ISP if it can be put into "bridged mode" so it acts as a modem only - if not set it so that the WNR2000 is in the DMZ.
Title: Re: Help with FTP please.
Post by: Wiggs on February 19, 2010, 05:54:47 AM
I agree with fordem, it sounds as if you  have two routers in your setup - your ISP's modem/router and your router. 

Does you modem have multiple lan ports that you could use instead of having to use the other router?  Also, trying to set bridge mode will also help if it is possible as stated in the previous post.

If not, we will have to be creative and do some extra forwarding to have traffic reach the FTP behind the modem/router -> router configuration.   

Wiggs,

Title: Re: Help with FTP please.
Post by: fordem on February 19, 2010, 06:03:35 AM
If not, we will have to be creative and do some extra forwarding to have traffic reach the FTP behind the modem/router -> router configuration.   
That's the reason for putting the second router in the DMZ of the first router.
Title: Re: Help with FTP please.
Post by: Wiggs on February 19, 2010, 08:11:32 AM
As... yes I missed that in your other post. 

Good point.... much easier than multiple forwarding from router -> router -> FTP server.

Wiggs
Title: Re: Help with FTP please.
Post by: tfiveash on February 19, 2010, 11:11:01 PM
Since he did not say whether he was setting up the DDNS in the router or the DNS-323 one thing I remember from a while back is if you set up your DDNS in the DNS-323 it will report the ip of the 323 and not the external address of the network.  This sounds like the case here since when he checks the ip he gets 192.168.xx.xx which is the address of the 323.  It is better to set up your DDNS in the router instead.  It will handle the external address correctly.
Also, remember if he has 2 active routers the first if not set right will have the outside world address but will output a 192.168.xx.xx address to the wan of the second router.  If the DDNS is setup in the second router it wll see the incoming address as 192.168.xx.xx since that is what it is getting on the wan.  That would screw up the address that the DDNS reports.  It would report 192.168.xx.xx because that is what it sees as the outside world. Remember the only device that knows what the outside world address is would be the first router.

Terry
Title: Re: Help with FTP please.
Post by: fordem on February 20, 2010, 05:21:49 AM
Remember the only device that knows what the outside world address is would be the first router.

Whilst the general point made in the post is a valid one (which has actually been covered in the posts immediately preceding) it is based on an invalid assumption - how a dynamic DNS client works.

Yes - the only device that knows what the outside world address is would be the first router - but - the "non router" dynamic DNS clients don't report their own ip address, in fact, they don't report any ip address at all - they contact the dynamic DNS server with an update request, and the server checks the source ip of the request, which, because of the NAT processes used, will be that of the so-called "first" router.

Regardless of how many routers you daisy-chain together, as long as you are using NAT, the router will insert it's own WAN address as the source address and make an entry in it's NAT tables so that it knows which internal ip to use when the response comes back.
Title: Re: Help with FTP please.
Post by: tfiveash on February 20, 2010, 03:41:20 PM
Thanks Fordem for the enlightening update on how DDNS works.  Boy do I have egg on my face and I will have to tell the guy that told me how it worked he was all wong.

One question I do have is does this request have anything to do with pinging the router?  The reason I ask is the router can be set so it will not respond to a ping.  Will it still respond to the DDNS request?

Thanks for the enlightened update.

Terry
Title: Re: Help with FTP please.
Post by: fordem on February 20, 2010, 07:50:03 PM
DDNS updates will work whether or not ping is enabled.
Title: Re: Help with FTP please.
Post by: william.walker87 on February 23, 2010, 09:47:46 PM
Ok Guys update is:

Lesson 1. Do not turn DHCP off on a clearwire modem. There is no hard reset button so this will brick the modem.
 
Everything on my end is set correctly except one thing. Clearwire remote accessed my computer checking everything. Set me up in DMZ and then tried port forwarding on the actual modem.

Lesson 2. Clearwire modems (this is motorola brand) likes and sometimes will only accept 1400MTU. DNS-323 cannot (that we could find) be changed from 1500 MTU.

I am going to upgrade to fw1.08 and see how it goes. Comments and ideas are appreciated
Title: Re: Help with FTP please.
Post by: gunrunnerjohn on February 24, 2010, 05:41:45 AM
Put a router in front of that useless modem and isolate yourself from it's oddities. :)
Title: Re: Help with FTP please.
Post by: william.walker87 on February 24, 2010, 10:00:18 AM
Well I upgraded the firmware and we are making progress.

Here is my latest test log

Test log
Status: Resolving address of thewalkersinhawaii.selfip.com
Status: Connecting to 75.95.246.212
Status: Connected, waiting for welcome message
Reply: 220---------- Welcome to Pure-FTPd [TLS] ----------
Reply: 220-You are user number 1 of 10 allowed.
Reply: 220-Local time is now 07:53. Server port: 24147.
Reply: 220-This server supports FXP transfers
Reply: 220 You will be disconnected after 2 minutes of inactivity.
Status: CLNT http://ftptest.net on behalf of 75.95.xx.xxx
Reply: 530 You aren't logged in
Status: USER anonymous
Reply: 230 Anonymous user logged in
Status: FEAT
Reply: 211-Extensions supported:
Reply: EPRT
Reply: IDLE
Reply: MDTM
Reply: SIZE
Reply: REST STREAM
Reply: MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
Reply: MLSD
Reply: ESTP
Reply: PASV
Reply: EPSV
Error: Carriage return without line feed received


From FileZilla I get this whole thing and this is the exact same settings as the other log:

Response:   220---------- Welcome to Pure-FTPd [TLS] ----------
Response:   220-You are user number 1 of 10 allowed.
Response:   220-Local time is now 07:49. Server port: 24147.
Response:   220-This server supports FXP transfers
Response:   220 You will be disconnected after 2 minutes of inactivity.
Command:   USER testing
Response:   331 User testing OK. Password required
Command:   PASS ********
Response:   230 OK. Current restricted directory is /
Status:   Connected
Status:   Retrieving directory listing...
Command:   PWD
Response:   257 "/" is your current location
Command:   TYPE I
Response:   200 TYPE is now 8-bit binary
Command:   PORT 98,155,166,161,94,93
Response:   200 PORT command successful
Command:   MLSD
Error:   Connection timed out
Error:   Failed to retrieve directory listing

As far as I can tell, and if I were an expert this whole deal would probably be working already, i am getting to the server and then for some reason it will not give me the directory listing? Is that about right?

FTP is the bane of my existence
Title: Re: Help with FTP please.
Post by: fordem on February 24, 2010, 10:36:45 AM
You're apparently trying to use passive ftp without configuring the DNS-323 and the router correctly - the first listing shows a PASV command which is the request to switch to passive ftp, the second listing shows a PORT command which is used to set the address and port to be used for the data connection.

Change the ftp client settings so that it's not using passive ftp and it should connect and work.

ftp is unique in that it requires two connections, a control connection and a data connection.  With active ftp the control connection is made from the client to the server and the data connection from the server to the client - with passive ftp both connections are made from client to server.

Each type of ftp has advantages and disadvantages - in my opinion active ftp using the standard port settings is the easiest to configure, however, some folk feel that this is inherently insecure.

I'm not going to get into a debate on security here, I will just say that I use it and have been for the better part of a decade without any issues and I'll continue to use it.

What I suggest you do is first configure active ftp with standard ports and after you have that working then look at improving the security.