Link to home
Start Free TrialLog in
Avatar of benjiwu
benjiwu

asked on

how to set up FTP server using DIR0655 (Dlink) with Dynamic IP

I am trying to set up a Netgear net drive at home to be the ftp server or can be accessed from outside home. I am using Dlink DIR-655 and it provide virtual server and port forward support.
But I dont have static IP only DHCP. I need step by step instruction to set up. And I am wondering how to access from outside ? As IP address like 192.168.0.197 (my netdrive IP) is common to million people so how can I do the file access ?
Avatar of Kerem ERSOY
Kerem ERSOY

Routers have two ports and it will connect your ISP'S assigned dynamic IP to you at one end and your 192.168.0.0/24 network at the other. This is why this device is called a router i.e., it routes traffic between its interfaces.

Routers use a technique called NAT that would allow services from inside computers (192.168.0.x/24) to be mapped to your outside (and dynamic) valid address. So that say if you have a web server inside it's HTTP port (80 will me mapped to the IP of your outside address and HTTP requests arriving to your routers outside address will respond it as if it is running the web server and forward the requests to your inside LAN computers http port.

In fact FTP is a protocol which requires a connection to your FTP server and your FTP server needs to connect you over another port. For a NAT gateway to support FTP it should understand all this while  I don't think you'll succeed with your router. Allow NAT to port 21 of your FTP server. Then allow oyur internal server to use passive FTP.

We're now ready to go but how will we know our dynamic address and access it? There's a method called Dynamic DNS and it allows us to run a small pogram in of the inside computers and it will go to dynamic DNS site and update the current address under the dynamic DNS and so that we'll connect it through the DNS such has a FQDN like : marrypc.dyndns.org.

Of course you need to set-up a free account to dyndns.org  an account and configure it to mp your IP to marrypc.dyndns.org all the time.

For more information please visit here:

http://www.dyndns.com/

I hope this helps and if you need further clarification let me konow

Cheers,
K.

Avatar of benjiwu

ASKER

Thanks,
I am using Netgear's SC101 so it is a network drive has its own IP - 192.168.0.102 (assign by router but I reserve the IP so it wont change internally).
This is the drive I like to be accessed from outside.
D-Link router has a "virtual server" feature as follows and is it the same as NAT as I did not find the NAT inside Dlink.
========================= Copy from Dlink Router ===============================
The Virtual Server option allows you to define a single public port on your router for redirection to an internal LAN IP Address and Private LAN port if required. This feature is useful for hosting online services such as FTP or Web Servers.
==============================================================================
 And I need to input the following fields:
Private Port: (I guess I need to enter "21" ?
Public Port : 21 ?
IP Address: Netgear driver address ? 192.168.0.102
Application Name: Telnet, HTTP, FTP, DNS,...etc
Protocol: TCP or UDP ?

Or this is not the right place to set internally ?
                                         
> And I need to input the following fields:
> Private Port: (I guess I need to enter "21" ?
Correct
> Public Port : 21 ?
Correct
> IP Address: Netgear driver address ? 192.168.0.102
Correct
> Application Name: Telnet, HTTP, FTP, DNS,...etc
FTP   (csince it asks the application it seems like it will handle the FTP.
> Protocol: TCP or UDP ?
TCP


> Or this is not the right place to set internally ?
On the contrary this is just the place to define it.
Once you've made these settings your server is setup and ready for access over internet.

But in order for anyone to reach your ;FTP servr they need to know its IP address. When I say the IP address I don't mean your intranet address but your Public IP. If you don't know what is your public IP just launch a browser and go here:

http://http://www.showmyip.com/

It will show your current public IP. But you'll not know if your IP address is dynamic and whther it will change when you reboot your D-Link Router. If this is the case I'll suggest you to create an account with here:

http://www.dyndns.org

It is free and once you've created an account and sign in it will then allow you to run a small program on one of your computers and it will update your ip address to it when it changes. And during the setup you'll pick a name such as myhomeftpserv and you'll be assigned myhomeftpserv.dyndns.org and it will return your current address so that you won't need to know your IP adress all the time. For more information you can refer to the site or ask here.

Cheers,
K.
Avatar of benjiwu

ASKER

I have just signed up at dyndns.org and I got a domain from the process. ex: myhost.serveftp.net
I did not know what program I need to run in oder to link this site to my pc.
Please advise.

Also, if I run showmyid.com and got lets say 333.33.33.3. Then I  try the following:
ftp://333.33.33.3 but nothing happen.
Anything missing ?

Thanks a lot
> I have just signed up at dyndns.org and I got a domain from the process. ex: myhost.serveftp.net
> I did not know what program I need to run in oder to link this site to my pc.
> Please advise.

Find it here:
http://cdn.dyndns.com/windows/DynUpSetup.exe

> Also, if I run showmyid.com and got lets say 333.33.33.3. Then I  try the following:
ftp://333.33.33.3 but nothing happen.
> Anything missing ?

Since your NAT is doing the mapping from inside to outside you need to be outside to test if it is working. You cant reach your website from inside using your public address.

Thanks a lot
Avatar of benjiwu

ASKER

OK, I download and ran the program from the link you provided me. It ran ok.
Does this PC need to be always on ?

I will try from outside tomorror from my office. The Netgear drive is always on as it is a net-drive and so is router. So, I assume if I type in ftp://myhost.serveftp.net on browser than I will be able to start upload and download files from Netgear drive ?
BTW I've noticed that your drive does not support FTP how can you be able to FTP your drive? In fact the only scenario that comes to my mind is you're attached your netdrive over SAN protocol to one of your PC-hosts and it is accepting FTP and saving the files over the NAS.
> Does this PC need to be always on ?
I don't thin it should be. In fact it should be on if your IP address changes. I don't know how often your modem resets or any electrical problem happens that your modem restarts. If this is rare than you 'll need to turn on the pc occasionally to update your IP address in the dyndns.


If this is your correct address that you've setup. I could be able to do the FTP connection. But since your NETGEAR does not respond to FTP (it does not have a built-in FTP server) the connection hangs there and times out. I'm repeating you need a host to respond FTP (listening to port 21) and the only way to relate this hsot to your netgear is to place the home directory of the bc based FTP server over the NAS mounted NetGear box.

If you don't have an FTP server for your pc you can grab this one here.It is open source and free:
http://filezilla-project.org/

Grab the Server.
Avatar of benjiwu

ASKER

Thank you for the great help. It is very informative. I download the filezilla and install it.
The IP address and port number to enter I suppose it is IP that Netgear has (it is 192.168.---) and port is 21 ?
In this case, I guess the PC has filezilla installed must be turn on all the time ? It beat the purpose that I thought since Netgear drive is always on so no PC need to be on. But you are right that the Netgear drive does not support ftp.
Yeah unfortunately It should stay on all the time. It is very sad that you're not ready to go with only NetGear is running. This is one of the points that people critisize the NetGear product It does not come default with ftp.
Normally, you would use a DSL router with DynDNS capability and integrated FTP access to a networked or USB drive to accomplish this. Nothing of that is available with your equipment, you will have to stick to the always-on PC, as KeremE stated.
Avatar of benjiwu

ASKER

that is fine to have the pc on all the time.
My question is with Filezilla server and client software. For server, it ask me the IP and Port. What IP should I enter ?
How about client ? Should I install on my notebook in office so that I can access my home's netgear drive ?
ASKER CERTIFIED SOLUTION
Avatar of Kerem ERSOY
Kerem ERSOY

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial