Help - Search - Members - Calendar
Full Version: Network Issue
Linuxhelp > Support > Technical Support
I have a FTP server on the internet that I need to connect to to work on some projects and the client is hiding behind a router. The issue I am having is when I connect to the FTP server, my client (Konqueror) sends my internal IP address with the PORT command and returns the error, "Unable to connect to localhost". Checking the logs on the server, I get:

port 192,168,0,191,129,6
    530 Only client IP address allowed for PORT command

My question is how can I set up Linux to work with my external IP instead of my internal one?
1st try a different connect program to verify that it's not a server misconfiguration. I've never seen this problem be an issue with the client software....although it could be a problem with a client firewall.

Try using gftp or one of the commandline tools (ftp, ncftp) to connect to the server from your client.

More likely, the problem is your firewall on the client. If you are using active FTP on the server (you are ... it is trying to do a port command), you will need to open all ports in higher than 1024 from the FTP server to your client in your clinet's firewall...

Or you will need to use Passive FTP on the server. If the server is already setup to use passive FTP, try setting the clinet to use passive ftp.

If the server is setup to use passive ftp, you can setup gftp to do passive transfers ... also you can make konqueror do passive transfers like this:

Here is a link to read what the difference is between Active and Passive FTP.

If you want to make it easy for clients behind a firewall to connect to your FTP server, you will need to set it up in passive mode ... or use SFTP as detailed below.
If you control the server and the client, instead of using FTP, I recommend that you allow ssh into the server, and then sftp into the server and copy files that way to your clinet machine. The passwords are sent encrypted (actually, all the comms between the clinet and the server are encrypted). You would need to open port 22 into the server to use sftp/ssh. (like you aready have done for port 21 to use FTP).

You can use gftp as a graphical SFTP clinet ... all I had to do was go to the server copy the path to the sftp-server and paste it into gftp in the FTP - Options menu selection, SSH tab, in the SSH2 sftp-server path. (One the server, the last line of /etc/ssh/sshd_config was Subsystem sftp /usr/libexec/openssh/sftp-server, so on gftp on my clinet, I pasted /usr/libexec/openssh/ into the SSH2 sftp-server path in gftp). Now you can pick ssh as the type of connection and login securely to transfer files smile.gif.

(one problem with sftp is that people are not stuck in a directory, but can go everywhere their user can get to on the server).
I think it is just Konqueror, as gFTP connects with no issues. The FTP server I am connecting to is Windows 2000 Pro running Serv-U FTP server and is for private use, so I am not worried about other clients connecting through firewalls. Ill just use gFTP until I can figure out a way to fix Konqueror. The reason I asked is I didn't know if Konqueror looks something up in /etc/hosts or similar to get the local IP. Oh well. Thanks Anyway
Wow, it looks like my server config was a little off. My ISP uses dynamic IPs so it changes every few hours to every few days and the passive IP was set to 4.46.48.x where now it is 4.46.43.x so it was denying the access. My FTP server is set up to be anal about its connections, so the slightest thing is different and it refuses the connection. Thanks for your help in reminding me about the server config.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.