LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-30-2005, 11:53 AM   #1
tdob
LQ Newbie
 
Registered: Oct 2005
Posts: 16

Rep: Reputation: 0
Weird VSFTP Problem


Hey,

Im so close to getting VSFTP to work the way I want, but I cant get my head around one thing.
My Suse box is setup with static IP 192.168.1.10. I can ftp to this box the way I like from my internal network (any 192.168.1.X) address.

I am using Dynamic DNS on my Netgear router, and forwarding port 20, 21 traffic to the Suse Box. Now, when I want to connect to the SUSE box using my hostname (or ISP IP 72.140.x.x) it takes about a minute to connect and when it does connect I can see no files, and I try to upload something and it just keeps retrying and retrying and nothing happens.

I have disables anonymous access on VSFTP and allowed local user access, and I am logging into the FTP server with a local account I have created, this user has full access over the /srv/www/htdocs/site directory, and the user gets chrooted to this directory when connecting.

Anyone have any ideas on what I am missing here?

Oh yea, I can telnet to 127.0.0.1 21 on my Suse box, so im not sure where my problem is lying? And im not running a firewall on my Suse box.

Also, this is the ftp client log (WS_FTP) when I am trying to connect to the 72.x.x.x address.

Substituting connection address 72.140.x.x for private address 192.168.1.10 from PASV
PORT 192,168,1,12,17,198
500 Illegal PORT command.
Port failed 500 Illegal PORT command.

It connects, but I see no files/cannot upload.

Im using Suse 10.
 
Old 10-30-2005, 01:28 PM   #2
tdob
LQ Newbie
 
Registered: Oct 2005
Posts: 16

Original Poster
Rep: Reputation: 0
No VSFTP experts around?

Hard finding much support for this, but I guess I will have to make do with what I got for now.

At least I can FTP to it from other machines in my internal network, that should keep me occupied for a while, but my curiosity needs to know why this isnt working.
 
Old 10-30-2005, 01:31 PM   #3
nistelrooy
Member
 
Registered: Oct 2003
Location: Singapore
Distribution: debian
Posts: 162

Rep: Reputation: 30
Hi there, temporarily, disable your PASV (passive-mode) in your FTP client and try to upload files.
Hope it helps.
 
Old 10-30-2005, 02:32 PM   #4
tdob
LQ Newbie
 
Registered: Oct 2005
Posts: 16

Original Poster
Rep: Reputation: 0
No, ive tried that (disabling PASV).

In SmartFTP client from a windows machine I get this message.

Resolving host name "example.net"
Connecting to 72.140.x.x Port: 21
Connected to example.net.
220 "Welcome to My FTP server."
USER admin
331 Please specify the password.
PASS (hidden)
230 Login successful.
SYST
215 UNIX Type: L8
FEAT
211-Features:
EPRT
EPSV
MDTM
PASV
REST STREAM
SIZE
TVFS
211 End
PWD
257 "/"
TYPE I
200 Switching to Binary mode.
PASV
227 Entering Passive Mode (192,168,1,10,183,221)
Opening data connection to 192.168.1.10 Port: 47069
LIST -aL
0 bytes transferred. (N/A/s) (0 ms)
425 Security: Bad IP connecting.
Automatic failover of data connection mode from "Passive Mode (PASV)" to "Active Mode (PORT)".
PORT 192,168,1,12,7,17
500 Illegal PORT command.
 
Old 10-30-2005, 05:00 PM   #5
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Your router will have to support connection tracking for passive connections (my Netgear router does this fine - it runs a 2.4 version Linux kernel).

For active to work, you'll have to allow the PORT command in vsftpd.conf

Dave
 
Old 10-30-2005, 08:44 PM   #6
tdob
LQ Newbie
 
Registered: Oct 2005
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks for the reply.

I have set port_enable=YES but still nothing. This is the ftp log (from WS_FTP)

connecting data channel to 192.168.1.10:93,116(23924)
Substituting connection address 72.140.X.X for private address 192.168.1.10 from PASV
PORT 192,168,1,12,9,167
500 Illegal PORT command.
Port failed 500 Illegal PORT command.

But the thing is, it connects. Although I can see no files, and cant upload, the connection is present. I have a Netgear WGR614CN router, but I have tried turning Passive off both in the config file, and in the FTP client and it does me no good.

This is getting frustrating, especially because it works so well on the internal network.
 
Old 10-30-2005, 09:29 PM   #7
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Are you trying to ftp to your ISP assigned address from inside your network?
 
Old 10-30-2005, 09:49 PM   #8
tdob
LQ Newbie
 
Registered: Oct 2005
Posts: 16

Original Poster
Rep: Reputation: 0
Yes I am.

I am using DynamicDns, and am mapping a hostname to my ISP IP Address.

I figure this SHOULD work, am I just blatantly missing some network fundamental here?
 
Old 10-30-2005, 10:09 PM   #9
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
That's your problem. Until very recently (I just noticed about half an hour ago that there was a new firmware for my router) Netgear routers couldn't do port forwarding with traffic coming from private IPs. I'm surprised you could get any sort of connection at all.

Check the 'known issues' near the bottom of this page:
http://kbserver.netgear.com/release_notes/D102713.asp
(it's a support page for my DG834 router).
See if there's a firmware update on the Netgear site for yours.

Your setup probably works fine for people outside your network already.

Dave
 
Old 10-31-2005, 08:52 AM   #10
tdob
LQ Newbie
 
Registered: Oct 2005
Posts: 16

Original Poster
Rep: Reputation: 0
Its funny, my problem sounds like what is said in the firmware page of your router. But my router (WGR614CN) says nothing like that in the firmware page.

I am able to access my FTP Server from here in work, so I guess it is an internal problem.

Will try to upgrade my firmware when I get home, see what happens...
 
  


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
VSFTP Problem reythegreatdotcom Linux - Newbie 2 11-14-2005 07:29 AM
vsftp problem dsf767 Linux - Networking 3 02-03-2005 03:05 AM
weird IP trying to connect my vsftp max_tcs Linux - Security 2 01-07-2005 10:25 AM
VSFTP having a weird issue bad_lemming Linux - Newbie 2 10-04-2004 08:58 AM
Weird, weird apache2 problem atheist Debian 1 09-17-2004 08:26 PM

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

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