LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 01-31-2005, 10:17 AM   #1
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Rep: Reputation: 32
running FTP server on a LAN for folks outside of the LAN


I need to run an FTP server here on one of a few machines on a LAN (which is behind a router, possibly running a firewall), but I want my friend on the other side of the Internet to be able to access that ftp service.

It happens to be a Mac OS X machine that I'm going to run the ftp server on, but my question is general: From my machine on the lan, I know only my local IP address (something like 192.168.0.3). Once I've started up the ftp service, what IP address do I give my friend so he can access that service?
 
Old 01-31-2005, 11:34 AM   #2
n3tw0rk
Member
 
Registered: Sep 2003
Location: Rawalpindi, Pakistan
Distribution: Slackware
Posts: 86

Rep: Reputation: 15
You will have to setup port forwarding on the router. That will be something like: If someone asks for FTP redirect him to abc.def.ghi.jkl ( replace it with your your IP address). Then you will give your friend the IP address assigned to your router, that router will have two IP addresses, one on the Internal network and one on the external (Internet, the one that you will give to your friend). If a Linux machine is serving as a router than you can use iptables to setup DNAT (Destination Network Address Translation) to achieve the same functionality as explained above.

Last edited by n3tw0rk; 01-31-2005 at 11:36 AM.
 
Old 01-31-2005, 12:47 PM   #3
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Original Poster
Rep: Reputation: 32
Thanks n3tw0rk. :) I'm actually using an off-the-shelf "hardware
router" (what's the name for those? "dedicated router"?
"shrinkwrapped router"?)

I can log into the webserver running on my router (http://192.168.10.1),
and go to a config screen that labeled "forwarding" -- I think that's what
I'm looking for.

It's got a window that lets me choose some details regarding
TCP/IP port forwarding:
Code:
TCP Port Forwards  	
Start 		End 		IP Address 		Start 		End
	- 		> 		: 		-
I'm supposed to fill in those blanks and commit them for each
port range. Can you tell me:

1. What port range am I supposed to use, and
2. What that 2nd set of "Start" and "End" fields supposed to mean?
Looks like it's just duplicating what's in the first 2 fields.

For IP address, I'm just going to put in my 192.168.x.x for
the local computer running the ftp server.
 
Old 12-23-2006, 11:54 AM   #4
Cereal765
Member
 
Registered: May 2006
Distribution: Fedora Core, SuSE
Posts: 44

Rep: Reputation: 15
FTP usually runs on port 21, confirm first that it is ( or maybe that its just working, I dunno, im paranoid) with an nmap scan of yourself, and then open port 21 on the router.

When it says range, its merely asking if you want to open more than one. Just put 21 for start and end. The IP to forward too should be the internal address of your server, unless your just going to forward to all of them (some routers have that option).
 
Old 12-23-2006, 04:10 PM   #5
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
In addition, if you want your friend to be able to use passive FTP (which will likely be necessary if he is behind a NAT router) you will need to forward the passive FTP ports through your router. You can choose the passive ports with the PassivePorts directive in proftpd.conf for proftpd (not sure what FTP daemon you plan to use but others have similar mechanisms). This page has a little write-up explaining it.
 
  


Reply



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
Running A Quake 3 Server over LAN and internet Bremen Linux - Games 1 06-05-2005 09:48 PM
Cant connect to my webserver and ftp server from outside LAN akudewan Linux - Networking 3 05-15-2005 02:00 PM
LAN ftp server stalls after login servnov Linux - General 5 12-01-2004 05:41 PM
Allowing access to FTP server on LAN using IPTABLES - Help please sergio3986 Linux - Security 2 12-18-2003 12:22 PM
FTP server on LAN dakalro Linux - Networking 1 11-14-2002 02:07 PM

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

All times are GMT -5. The time now is 09:36 AM.

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