Solved

Setting up a FTP server with a LAN computer

Posted on 2004-09-20
21
350 Views
Last Modified: 2013-11-29
Hey, I've got a computer on a LAN (on a router with other computers) and I want to use that computer as a FTP server. Now, is it possible to do so? even if I have a false IP address (192.168.0.3) and if so, Is it possible to do it with Apache and then install PHP4, MySQL and PHPMyAdmin?

If so, is it complicated?
0
Comment
Question by:Charles03
  • 10
  • 8
  • 3
21 Comments
 

Author Comment

by:Charles03
ID: 12108447
What I really mean is that I would like to be able to put files in c:\WEB for example, and then, when I'm at work, type a IP address on my browser and be able to download/view files in c:\WEB.
For example, type 234.242.42.34/work/menu.htm or 234.242.42.34/work/menu.zip

Is that possible?
Is it possible to explain it within experts-exchange or just too complicated and long?

Thank you guys
0
 
LVL 5

Expert Comment

by:zerofield
ID: 12108465
well, i'll clarify a couple of things for you, then you can clarify your question.

you dont have a "fake" address, its simply an internal one.  your external one is the one on the interface of the DSL router.  it's performing NAT on the internal addresses to pass traffic to/from the internet via the one external (as you would call it, "real" address).

Ok, so when you ask if you can use it as an ftp server (or web or whatever else) the answer is simply yes.  time for some ascii art:

192.168.1.10   PC-1   ---->          |10.2.3.4 |
192.168.1.11   PC-2   ---->          |Router   |  ----> internet


now if your ftp/web/etc server were running on PC1, then PC2 could ftp or browse to it's internal address of 192.168.1.10 and access it normally.

In order to have the internet connect to the ftp/web/etc services on that host, the router has to know what to do with requests to each particular port.  For example, if you want to ftp to the inside server of 192.168.1.10, the router must know to forward/translate/whatever its called on your router/firewall the requests from port 21 on to the inside address of 192.168.1.10.

So, in practice, you setup the port forwarding on the router on port 21 to forward to 192.168.1.10, and when people ftp to 10.2.3.4, they actually login to 192.168.1.10.

To answer the "is it complicated".. dunno, you tell me after reading this ;)
0
 
LVL 5

Expert Comment

by:zerofield
ID: 12108477
You just added your comment while I was typing this..

To do what you said, its the same principle.  You'd setup the router to do port forwarding of port 80 to the internal webserver's address.

99% of home router or firewall devices, at least those that considered this much, wont let you connect to it in order to configure it using the external address ("real address").  The easiest way to get the ip you're looking for is to check the current default gateway that each internal machine is using.  It'll likely be something like 192.168.1.1 or .10 or .100.  I think 99% of cable modems will use one of those number sets in the last octet.

There's no guarantee this is even an option with what you have.  If it's a cheese $5 ISP issue, it likely wont do this.  If it's a linksys/dlink or something like that, you can do this.  If it's a cisco let me know, no point in going that far into this right now.
0
 
LVL 1

Expert Comment

by:freakyuno
ID: 12108487
It's More than possible, your hitting on the very thing routers were made for.  The "home router" trend has kind of mislead alot of people for a few years now, most people dont use their router in router mode at all.  They use it as a gateway device that performes translated NAT, totally different thing.

I can walk you through the specific steps if you give me your router brand and model, and firmware version.  If your pretty comfortable with your routers settings (there's always the magic reset button the back if you screw something up), what you need to do is go into your routers config, or web console, and get to the spot where it has port forwarding.  You want to forward the ports for a specific service to the machine that is running them.  For example:

Router (192.168.0.1 outside address XXX.XXX.XXX.XXX) Forward on port 20 and 21  for TCP to Client(192.168.0.3) for FTP

What happens is, an external request from a machine over the internet hits your router on a specified port. (in this case, 20 for the dataline of an FTP transfer, and 21 for the control line of FTP)  and your router detects that it's not supposed to handle that request, and forwards it on to the appropriate client.

In some routers there are advanced configs where you can actually specify which port you want it to forward on.  If this is the case, unless your pretty comfortable with not only routing and NAT, but with MySQL, PHP and Apache, I'd just let it forward to the default ports.

You can find a good port listing here
http://lists.gpick.com/portlist/portlist.htm

Hope that helps you out.
0
 

Author Comment

by:Charles03
ID: 12108688
Alright, sounds pretty simple in theory, but pretty tought on practrice.
Let's see, my computer for use as a web/ftp server has this address (when I promt ipconfig):
Ip address: 192.168.0.102
Default Gateway: 192.168.0.1

My Router model is a D-Link DI-604 And I don't have any idea how I configure a Router, I never did that before.

Note: I have 2 computers, One with Windows XP and one with Windows 98 (this is the one to be a server). Is it ok if I configure the router on the WindowsXP system? It's faster and works better.

Thanks for your time, I guess it will be much longer than I expected, Maybe I'll have to raise the points

    -Charles
0
 
LVL 1

Accepted Solution

by:
freakyuno earned 100 total points
ID: 12108842
From which machine you configure the router doesnt matter.  Your basically just connecting to it, the same as your remote turns your TV on and off.  Your not making any changes to the local computers.

A win98 machine can perform just fine as a server under the right circumstances, but I would suggest you dont put any mission critical applications on it, and dont expect it to be serving more than 1 client at a time.

To configure your D-Link, I'm assuming it's Revision E (you can find the Rev. on the serial number label)

I actually found a link to the instructions right on the Dlink sight.  I read through them and they seem pretty straight forward.  If you dont understand them, or need more help, just keep the thread running. :)


http://support.dlink.com/products/view.asp?productid=DI%2D604%5FrevE
0
 

Author Comment

by:Charles03
ID: 12116213
Whoo! I just blew up my connection! It took me all day to be able to have internet again!
I downloaded the latest Firmware on my router and right after, internet was dead. I tried resetting the router, but nothing happened.
I finally got internet working again, but I looked at the management system of the router, and I don't think I would like to set up my http/ftp server all by myself before I screw smething up again...

So Maybe I would need a couple of clues, just to begin please

thanks

   -Screwy Charles
0
 

Author Comment

by:Charles03
ID: 12116381
Wow, I got it!

I enabled the HTTP server!

What now? If I put 192.168.0.102:80 in my web browser, nothing happens, What do I have to do next?
And most important, what is the address to use when I'm at work? it can't be 192.168.0.102:80 right???

thanks again
0
 
LVL 5

Expert Comment

by:zerofield
ID: 12116425
if you have the webserver running, you should be able to pull it up by putting just 192.168.0.102 in the browser (80 is default, you dont have to put that in there, you only put :port if its not 80)

no, it wont be 192.168.0.102 from outside.  this comes back to what i was talking about with translating or port mapping.  read what i posted above with that in mind, it'll make more sense now i think.

you need to tell the router/firewall/whatever to forward port 80 to the inside address of 192.168.0.102.  then whatever the 'real' ip is on your router/modem/etc is (you can go to www.whatismyip.com) would be the one you'd put in from the outside world in order to access your webserver.
0
 

Author Comment

by:Charles03
ID: 12116983
Sorry, I tried to understand, And read again and again all the previous posts, but still, I don't know where to do the redirection from the outside.

And when it's configured, Where will the web browser be pointed at? c:\ ??
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 5

Assisted Solution

by:zerofield
zerofield earned 100 total points
ID: 12117073
nono, dont make this too hard, its really not that bad!

you do the redirection at the dsl or cable modem's router.  you said you have a few computers behind one right?  the sure shot way to get the inside address of that cable modem (it will have 2 addresses, 1 that the devices sitting behind it will see, and 1 that the ISP gives it, which is it's real internet address).

if your ip is 192.168.0.102, it's likely that the dsl modem is 192.168.0.1 or 192.168.0.100.  it could always be soemthing else, but those are the two i'd try.  if in doubt, from a command prompt, run:

ipconfig /all  the default gateway is the dsl modem's ip address.

now wether or not that dsl modem/router is capable of even forwarding is totally beyond me.  do you know what model it is?  If it's something the ISP gave you, its very possible it wont do forwarding at all :/  if thats the case, you could get a linksys or netgear dsl router for somewhere in the realm of $30 off ebay, $50-100 at a local best buy or whatnot.  its honestly been awhile since ive purchased one.

so, take that address (the default gateway one, the one on the cable modem) and stick that in your browser:

http://192.168.0.1 or http://192.168.0.100 or whatever the default gateway is, if its not one of those.

if you get a website, it should be pretty obvious pretty quickly if you can do forwarding with it or not.  if not, you gotta buy some more hardware no matter how you cut it, unfortunately.  wont know til you try!
0
 
LVL 5

Expert Comment

by:zerofield
ID: 12117171
wait i just read up.. you said you connected to the management of the router already?  somewhere in there is where it would have the forwarding.  if there's no option for it in there for "forwarding" or "mapping" or something of that nature, then you're out of luck with that particular model.  if its in there, you just tell it to send port 80 to 192.168.0.102
0
 

Author Comment

by:Charles03
ID: 12117227
My router model is D-Link DI-604 revision C
and on the router settings, (when I type 192.168.0.1), There is a virtual server tab under the advanced tab. Now, I already enabled it, as well as the FTP server.
I tried every section of parameters, and it's all stuff I don't know or don't understand. So I don't know where I have to put that when I type the Router address in the browser (the Whatismyip.com adress), it's redirected to 192.168.0.102

And I just don't understant where I have to put index.htm on my computer so the browser will display it. Maybe I need to install Apache server, and maybe you already tried to explain this to me and I just don't understand.

Sorry If you already explained it all, but I'm a visual person and I understand better with drawings and plans than with words. Maybe it would be better that I contact D-link so they explain it to me for themselves.
0
 

Author Comment

by:Charles03
ID: 12117271
Oups,  You added a comment while I was adding mine

So it's always forwarding or mapping, cause, there is no such thing. That means I can't have a http server? great
0
 
LVL 5

Expert Comment

by:zerofield
ID: 12117294
let me investigate that model some, give me a few min.
0
 

Author Comment

by:Charles03
ID: 12117325
I wrote to D-link to inquire about the HTTP server
0
 
LVL 5

Expert Comment

by:zerofield
ID: 12117332
cool, looks like i found you your visual:

http://www.portforward.com/dlink/di-604-portforwarding.htm

thats exactly what you want.  the private address would be the 192.168.0.102 address of your internal server.  after reading that website with its pictures, this should be pretty simple for ya.  im headed out of here in a few minutes, but ill check in on this in a few.
0
 
LVL 1

Expert Comment

by:freakyuno
ID: 12117356
I posted the instructions to forward ports already for that specific model.  In fact I linked to the d-link website where it gives it to you with pictures and everything.
0
 
LVL 5

Expert Comment

by:zerofield
ID: 12117372
oh yea he did..i didnt read up either, im at work and its been a fast day, i replied before reading all of em.
0
 

Author Comment

by:Charles03
ID: 12117478
Yeah, I have already read the comment from freakyuno, and I already did all this, but I didn't know this was actually the forwarding, I tought I only activated it there, and that I did the forward at another place. So from the begining, all this was already done.

So the last part is where I have to put index.htm so I can view it from a browser when I type my router's IP address ? Do I need something like Apache?
0
 

Author Comment

by:Charles03
ID: 12119033
Alright, forget it, I figured it out all by myself, thanks anyway
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Please see preceding article here: http://www.experts-exchange.com/Networking/Operating_Systems/A_11209-Root-Bridge-Election.html Figure 1 After Root Bridge has been elected, then what?..... Let's start by defining a Root Port in la…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now