LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-01-2004, 12:35 PM   #1
marlor
Member
 
Registered: May 2004
Distribution: Slackware C
Posts: 274

Rep: Reputation: 30
noob FTP question ...


hi people,

i just got a ftp server running. here is the deal. i am behind a router with one win2000 and one slackware box. the ftp i mainy set up to share files easily between those computers.

Question:
lets say i want my friend to access my ftp server to get some mp3 from me (over the internet). as i am behind a rounter, which ip address do i have to give him/her for him/her to connect to my ftp server?

i don't think it's the ip address that the router assigns for the pc's. and if it's the ip address which my internet provider gives me, and my friend tries to connect to my ftp server how will his/her pc know which of the 2 pc's i have he/she has to connect to.


thanks in advance
 
Old 08-01-2004, 12:43 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
You will need to give your friend the IP address of your router and then change the configuration of your router to forward port 21 to the local ip address of your ftp server.
 
Old 08-01-2004, 02:17 PM   #3
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
I use this to verify my ip seen from outside :

Code:
curl -s http://www.whatismyip.com/ | grep '<TITLE>' | perl -pe 's/[a-zA-Z]|\s|<|>|\///g;s/\.$//;';echo
 
Old 08-01-2004, 02:20 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
or a little easier to remember:
lynx -dump http://www.whatismyip.com | grep Your | cut -d" " -f 4

Remember that this won't work if you have a proxy outside your network.
 
Old 08-01-2004, 02:51 PM   #5
fredgt
Member
 
Registered: Feb 2004
Location: Belgium
Distribution: Suse 9.1 Pro / Gentoo
Posts: 114

Rep: Reputation: 15
when you're running an ftp server from behind a router it will probably not work with the standard settings.
1st problem you can encounter is that some internet providers block most ports under 1024 to prevent you from running servers. This is not a big problem and easy to fix
assuming you are using proftpd you can edit /etc/proftpd.conf (you'll need to do this as root)
change "Port 21" to whaterver port you want to use.
now when you want to connect to the server you'll have to specify the port for example ftp://213.119.xxx.xxx:2000 when you're using port 2000
2nd problem is that you probably have to use passive ftp when the server is behind a router.
for a small ftpserver with only a few connections at a time you'll only need 5 or 6 passive ports.
you can use this by adding a passive portrange to you're /etc/proftpd.conf
"PassivePorts 49152 49156" add this to your config file.
you can add it anywhere but to keep the file readeble ad it after the port settings
3rd problem will be that you'll need to forward these prorts to you're computer in you're router settings.
i don't know how you do this with the router you're using but normaly you can log in to the router using a webbrowser.
There should be some settings for port forwarding or virtual server.
here you'll need to add all the ports the server will use (2000, and all the passive ports).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ftp to home computer? (noob) babag Linux - Networking 3 06-27-2005 11:12 AM
noob question - ftp? babag Linux - Networking 6 06-22-2005 01:15 PM
Noob wants FTP and WebServer scdark Linux - Software 12 05-26-2005 10:05 PM
Complete noob question from a noob noob_hampster Linux - Software 2 09-04-2003 12:03 AM
ftp server noob ? phishintrip Linux - Newbie 7 06-24-2003 05:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration