LinuxQuestions.org
Visit Jeremy's Blog.
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-05-2004, 01:18 PM   #1
cevjr
Member
 
Registered: Jul 2003
Location: USA
Distribution: Slack 12.2 and Ubuntu 9.04
Posts: 61

Rep: Reputation: 15
proftpd - localhost works. but can't connect from a PC on the network


I just started experimenting with proftpd and I tried ftp localhost to see if it works and it does!
However, when testing - I tried to connect from a laptop on the local network I could not.

I am a home user sitting behind a NAT/router.
I am using Verizon DSL
I have slackware 9.0
So far I have:
* deleted ftp from /etc/ftpusers
* added the local IP address of my laptop (192.168.x.x) to /etc/hosts.allow
* enabled portforwarding on my router / ftp - port21 -
* opened port 21 on my firewall

What should I do now to connect from my laptop on my local network?
And would I have to do anything different if connecting from outside my LAN?

Thanks
-C
 
Old 02-05-2004, 07:37 PM   #2
artur
Member
 
Registered: Apr 2002
Location: Illinois, US
Distribution: Red Hat, Fedora, Yellow Dog, Debian, FreeBSD, Embedix
Posts: 106

Rep: Reputation: 15
check what's in /var/log/messages - anything related to ftp?
check proftpd.conf anything there that would disallow remote access?
You don't mention what exactly happens when you try to connect. Do you get a login prompt? Do you get a password prompt?
You could try running tcpdump on server machine to capture the traffic and see what happens.
Is your firewall open on the server for port 21? Might also want to forward and open on f/w port 20 that's also used by ftp.
Post more details
 
Old 02-06-2004, 01:52 PM   #3
Nic-MDKman
Member
 
Registered: Feb 2004
Location: Sacramento, CA, USA
Distribution: Mandrake 9.2
Posts: 159

Rep: Reputation: 30
I am having the same problem, and I have port 20 (as well as 21) forwarded in my router's virtual server configuration.

The FTP server connects, but then I get an error that says unable to build data connection when I try LIST. The problem appears to be that port 20 is not open.

I ran netstat -tanp and it shows proftpd watching port 21, but not port 20, and I tested to see if port 20 would open by trying to telnet to 192.168.0.x (my machine's IP) and it says connection refused.
 
Old 02-06-2004, 04:07 PM   #4
g-rod
Member
 
Registered: Dec 2003
Location: Long Island, NY USA
Distribution: RedHat, SUSE
Posts: 336

Rep: Reputation: 30
Check that you are not firewalling the connection.
iptables -L;
To clear all firewall rules as a test
iptables -F;
iptables -P INPUT ACCEPT;
 
Old 02-06-2004, 04:18 PM   #5
Nic-MDKman
Member
 
Registered: Feb 2004
Location: Sacramento, CA, USA
Distribution: Mandrake 9.2
Posts: 159

Rep: Reputation: 30
i removed iptables and shorewall
 
Old 02-13-2004, 10:39 AM   #6
artur
Member
 
Registered: Apr 2002
Location: Illinois, US
Distribution: Red Hat, Fedora, Yellow Dog, Debian, FreeBSD, Embedix
Posts: 106

Rep: Reputation: 15
Port 20 only gets open by ftpd for data transfers, so normally you will not see it open, only when there's a data being exchanged. Still your router should have the mapping for it enabled.
Are you able to connect to your ftp server from the local network? If yes, then I'd look at the router config. If no, then it is probably something on the server.
Do try
tcpdump -w dumpfile -s 0
to capture ftp traffic on the server and then
tcpdump -r dumpfile -nX | less
to see what got captured. I purposely do not use "port 21" or other options so taht all traffic is captured in case there's something funny going on. You should see your server send the login prompt, your client reply, server send password prompt, client reply and so on.
 
Old 02-22-2004, 04:44 PM   #7
cevjr
Member
 
Registered: Jul 2003
Location: USA
Distribution: Slack 12.2 and Ubuntu 9.04
Posts: 61

Original Poster
Rep: Reputation: 15
Verizon does not stop your FTP connection. I was wrong! The problem I had was that the Netgear MR814 router that I use does not allow more than 1 connection on the forwarded port. Since I was trying to connect from inside my network...it was preventing me. However when I went outside my local network (someone elses house - it worked). If this does not make sense let me know or go to http://kbserver.netgear.com/kb_web_f...sp#RP614Anchor

So, to summarize what I did:

for anonymous connection no uploading!
use proftpd-1.2.8-1386-2
modify files
/etc/ftpusers (get rid of ftp)
/etc/proftpd.conf (use the basic conf)
remember to port forward on router ports 20 & 21
remember to open ports 20 & 21 on firewall

USE gFTP for an ftp client
IF LOCAL
on client side: log into 192.168.x.x and do not allow passive

IF WWW (make sure you are outside of your local network)
on client side: log into ipaddressverizongives.x.x.x and do not allow passive/try passive
 
  


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
can't ping localhost, Internet works fine drowstar Linux - Networking 5 01-04-2005 03:09 PM
Proftpd and anonymous login problem from localhost. immer Linux - Networking 0 12-12-2004 07:36 AM
Apache only works on localhost Airwaves Linux - Networking 8 07-12-2004 02:29 AM
Apache works localhost but not over the internet newuser455 Red Hat 4 05-22-2004 11:04 AM
SSH To IP Address Fails - Localhost Works ViragoRider Linux - Newbie 7 10-03-2003 07:19 AM


All times are GMT -5. The time now is 11:33 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration