[SOLVED] ftp problem , some configuration missing?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I premise I'm a networking newbie.
That's my configuration in a VBox virtualized scenario (XP host) with 2 machines:
A. Ubuntu 10.04 guest machine with a bridged NIC (eth0) on the LAN network 10.0.0.0/24 (ip addr.: 10.0.0.160) and an internal network NIC (eth1) on the private network 10.0.10.0/24 (ip addr 10.0.10.1)
This machine acts as a DHCP server for the private network.
B. Debian guest machine with eth0 on the private network 10.0.10.0/24 (ip addr.:10.0.10.21)
On Ubuntu I've configured iptables packet forwarding between eth0 and ath1 trough these rules:
Code:
-A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i eth1 -o eth0 -j ACCEPT
and it works: from Debian machine I can reach both the LAN network and the internet.
The problem comes trying to ftp a server on the LAN from Debian: I can connect to the ftp server and send commands like 'cd', but when I try to get/put something from/to the server I get the error "425 Not able to open data connection".
This doesn't happen on the Ubuntu machine where I can get/put files on the ftp server without any hassle.
Hi there,
Can you please paste the output of /etc/vsftpd.conf file.
Ooops, I forgot to mention the ftp server is not a *nix neither a windows server, it is an IBM midrange server.
The client I'm trying to connect from is the Debian machine.
Quote:
Originally Posted by T3RM1NVT0R
Also run the ftp from debian server using the following switch: ftp -d ip_or_dnsname_of_the_server
-d is used for debugging, lets see if we get more information from that.
Running ftp -d from the Debian client the output I get when I try to get/put something is:
Code:
fabio@pc-fdebian:$ ftp -d 10.0.0.5
Connected to 10.0.0.5
220 QTCP at i520
220 Connection will close if idle more than 5 minutes
ftp: setsockopt: Bad file descriptor
[...]
---> USER qpgmr
331 Enter Password.
Password:
---> PASS XXXX
230 QPGMR logged on
---> SYST
215 OS/400 is the remote operating system. The TCP/IP version is "V5R3M0".
remote system type is .
ftp> get sources.list
local: sources.list remote:sources.list
ftp: setsockopt (ignored): Permission denied
---> PORT 10,0,10,24,179,226
200 PORT subcommand request successfull.
---> RETR sources.list
425 Not able to open data connection
No problem from the other client (Ubuntu 10.04)
Code:
fabio@pc-fubuntu:$ ftp -d 10.0.0.5
Connected to 10.0.0.5
220 QTCP at i520
220 Connection will close if idle more than 5 minutes
[...]
---> USER qpgmr
331 Enter Password.
Password:
---> PASS XXXX
230 QPGMR logged on
ftp> get sources.list
local: sources.list remote:sources.list
ftp: setsockopt (ignored): Permission denied
---> PORT 10,0,10,160,185,58
200 PORT subcommand request successfull.
150 retrieving file /home/qpgmr/sources.list
250 file transfer completed successfully.
621 bytes received in 0.01 secs (95.5 kB/s)
The last two numbers of the 'PORT' after the ip address always vary between successive calls.
Fabio.
Last edited by ilmasce; 06-13-2011 at 10:25 AM.
Reason: new elements added
Also check if default gateway on problematic system has been setup correctly or not.
Is there any firewall between FTP server and both clients. If yes, do both client uses same firewall to reach to FTP? Let us know ifconfig and routing table of both debian and ubuntu system.
From ifconfig and roue output I can see that your Debian sysem is pointing to eth1 of Ubunu system. is Ubunu system your default gateway?
well I addedd 10.0.10.1 as default gateway on Debian (route add default gw 10.0.10.1 or set by DHCP server on Ubuntu trough 'option routers' in dhcp.conf) 'cause otherwise I could'nt reach the 10.0.0.0 network. The default gateway for the 10.0.0.0 network is 10.0.0.6
I also noticed another odd thing: why the debian system stops pinging (host unreachable) 10.0.0.x IPs as soon as I log off from Ubuntu? Seems liek Ubuntu stops routing as soon as I log out.
[SOLVED] ftp problem , some configuration missing?
Quote:
Originally Posted by ilmasce
well I addedd 10.0.10.1 as default gateway on Debian
Solved! I configured the route to 10.0.10.0 network on the ftp server's routing table, telling that the network can be reached through 10.0.0.160 (Ubuntu box) and it works! Can put/get without any problem now...I didn't think to routing problems 'cause other ftp commands (cd, ls etc.) were working.
Quote:
Originally Posted by ilmasce
I also noticed another odd thing: why the debian system stops pinging (host unreachable) 10.0.0.x IPs as soon as I log off from Ubuntu? Seems liek Ubuntu stops routing as soon as I log out.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.