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 02-23-2011, 05:55 AM   #1
seth3k
LQ Newbie
 
Registered: Feb 2011
Posts: 4

Rep: Reputation: 0
FTP nat problem


Hello,

I know this is a common problem, but i have a special case that troubles me and i can't find an answer anywhere.

The facts are like this:
I have a linux router. I have 2 FTP servers. One on port 21, one on port 201 (on the same internal IP).
The FTP works great when connecting on both servers from the outside.

My problem is when i'm trying to connect to the 201 FTP server from inside the network using the external ip.
I get this:
ftp> ls
200 Port command successful
150 Opening data channel for directory list.

And it stays like this forever.

Please help!!!!
Thanky you very much
 
Old 02-24-2011, 12:47 AM   #2
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 988
Blog Entries: 4

Rep: Reputation: 254Reputation: 254Reputation: 254
Greetingz and Welcome to LQ!

Quote:
Originally Posted by seth3k View Post
...I know this is a common problem, but i have a special case that troubles me and i can't find an answer anywhere.
It's actually not that special....
Quote:
Originally Posted by seth3k View Post
The facts are like this:
I have a linux router. I have 2 FTP servers. One on port 21, one on port 201 (on the same internal IP).
I'm going to guess that you're running NAT behind that Linux router, and doing port-forwarding, right?
Just noticed your subject-line. Yep, you're running NAT.
Quote:
Originally Posted by seth3k View Post
The FTP works great when connecting on both servers from the outside.
That's good to know, that means things are configured correctly....
Quote:
Originally Posted by seth3k View Post
My problem is when i'm trying to connect to the 201 FTP server from inside the network using the external ip.
Actually, that's not a problem. See, when NAT tries to answer a request when said request originates from inside itself, it gets a little confused. Same thing happens with web servers. There's a trick you can do;

PreReq: You're going to need a free domainname from someplace like DynDNS.
The whole "Flying by IP Addresses"-only thing isn't going to cut it when NAT's in the way.

*NIX:
Add an entry in your /etc/hosts file that looks like this;
Code:
your.ip.add.ress   fqdn.of.ftp.server ShortNameOfTheServer ShortAliasOfTheServer
Example:
Code:
10.0.0.1   ftp1.myinternal.domain.name.w00t ftp1 www.OMGitsAdomainName.com
W*ndowns:
Do the same as above, but search and edit the LMHOSTS file instead.
You might have to google around for the exact syntax. MSFT was never a big fan of standards....

Quote:
Originally Posted by seth3k View Post
I get this:
ftp> ls
200 Port command successful
150 Opening data channel for directory list.

And it stays like this forever.
You could also try connecting to the server via "Passive" mode. If you're not sure how to do that, grab FileZilla.
Quote:
Originally Posted by seth3k View Post
Please help!!!!
I hope it does, ping us back and let us know, okay?
Quote:
Originally Posted by seth3k View Post
Thanky you very much
You're welcome!

If this post (or any other) helps you out, hit "Yes" to the question in that post's bottom right-hand corner. Also, if your problem gets solved, go to "Thread Tools" at the top of this page and mark this [SOLVED]"

Last edited by xeleema; 02-24-2011 at 12:55 AM. Reason: Added noob text
 
1 members found this post helpful.
Old 03-03-2011, 04:18 AM   #3
seth3k
LQ Newbie
 
Registered: Feb 2011
Posts: 4

Original Poster
Rep: Reputation: 0
Thank you for the information.

I solved the problem, it was indeed beacuse of the DNS entries.
 
  


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
Ipchains, FTP, and NAT grider Linux - Networking 3 02-21-2006 09:46 AM
Can't use ftp nat whhappy Linux - Software 4 08-11-2003 05:33 AM
ftp server behind nat alansk Linux - Networking 2 07-17-2003 01:31 AM
ftp server behind NAT bax Linux - Networking 6 03-04-2003 09:41 PM
iptables, NAT and FTP cestor Linux - Security 10 01-04-2002 09:57 AM

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

All times are GMT -5. The time now is 07:44 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