LinuxQuestions.org
Help answer threads with 0 replies.
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 06-10-2011, 05:20 AM   #1
ilmasce
LQ Newbie
 
Registered: Jun 2011
Posts: 6

Rep: Reputation: Disabled
ftp problem , some configuration missing?


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.

What am I missing?
Thanks, Fabio.
 
Old 06-10-2011, 01:09 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi there,

Can you please paste the output of /etc/vsftpd.conf file.

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.
 
Old 06-13-2011, 09:21 AM   #3
ilmasce
LQ Newbie
 
Registered: Jun 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by T3RM1NVT0R View Post
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 View Post
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
 
Old 06-13-2011, 02:38 PM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Have a look at the following link: http://geekswithblogs.net/Lance/arch...tion.quot.aspx

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.
 
Old 06-14-2011, 11:34 AM   #5
ilmasce
LQ Newbie
 
Registered: Jun 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by T3RM1NVT0R View Post
No help, sorry
Quote:
Originally Posted by T3RM1NVT0R View Post
Is there any firewall between FTP server and both clients.
The proxy/firewall (ip 10.0.0.6) is on the same net of the ubuntu system (10.0.0.160 on eth0) and the ftp server (ip 10.0.0.5)
Quote:
Originally Posted by T3RM1NVT0R View Post
Let us know ifconfig and routing table of both debian and ubuntu system.
Debian system conf:
Code:
eth0      Link encap:Ethernet  HWaddr 08:00:27:dd:ca:06  
          inet addr:10.0.10.24  Bcast:10.0.10.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fedd:ca06/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:242 errors:0 dropped:0 overruns:0 frame:0
          TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:24278 (23.7 KiB)  TX bytes:4944 (4.8 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:656 (656.0 B)  TX bytes:656 (656.0 B)

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.0.10.0       *               255.255.255.0   U         0 0          0 eth0
default         10.0.10.1       0.0.0.0         UG        0 0          0 eth0
Ubuntu system conf:
Code:
eth0      Link encap:Ethernet  HWaddr 08:00:27:46:6b:59  
          indirizzo inet:10.0.0.160  Bcast:10.0.0.255  Maschera:255.255.255.0
          indirizzo inet6: fe80::a00:27ff:fe46:6b59/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2520 errors:0 dropped:0 overruns:0 frame:0
          TX packets:434 errors:0 dropped:0 overruns:0 carrier:0
          collisioni:0 txqueuelen:1000 
          Byte RX:239945 (239.9 KB)  Byte TX:52048 (52.0 KB)

eth1      Link encap:Ethernet  HWaddr 08:00:27:4e:c4:9e  
          indirizzo inet:10.0.10.1  Bcast:10.0.10.255  Maschera:255.255.255.0
          indirizzo inet6: fe80::a00:27ff:fe4e:c49e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:762 errors:0 dropped:0 overruns:0 frame:0
          TX packets:750 errors:0 dropped:0 overruns:0 carrier:0
          collisioni:0 txqueuelen:1000 
          Byte RX:82641 (82.6 KB)  Byte TX:351516 (351.5 KB)

lo        Link encap:Loopback locale  
          indirizzo inet:127.0.0.1  Maschera:255.0.0.0
          indirizzo inet6: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:76 errors:0 dropped:0 overruns:0 frame:0
          TX packets:76 errors:0 dropped:0 overruns:0 carrier:0
          collisioni:0 txqueuelen:0 
          Byte RX:5504 (5.5 KB)  Byte TX:5504 (5.5 KB)

Tabella di routing IP del kernel
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.0.0        0.0.0.0         255.255.255.0   U     1      0        0 eth0
10.0.10.0       0.0.0.0         255.255.255.0   U     0      0        0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth1
0.0.0.0         10.0.0.6        0.0.0.0         UG    0      0        0 eth0
0.0.0.0         10.0.10.1       0.0.0.0         UG    100    0        0 eth1
 
Old 06-14-2011, 04:18 PM   #6
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

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?
 
Old 06-15-2011, 03:32 AM   #7
ilmasce
LQ Newbie
 
Registered: Jun 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by T3RM1NVT0R View Post
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.
 
Old 06-15-2011, 05:50 AM   #8
ilmasce
LQ Newbie
 
Registered: Jun 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
[SOLVED] ftp problem , some configuration missing?

Quote:
Originally Posted by ilmasce View Post
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 View Post
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.
This problem remains...any idea?

Tnx, Fabio.
 
  


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
nepenthes configuration files missing geminihzh Linux - Software 0 12-07-2010 02:51 AM
DNS Configuration Tool Missing? lord loh. Fedora 2 06-08-2007 06:19 AM
missing file for wireless configuration daav Mandriva 2 10-17-2006 02:58 AM
Problem running UT Demo, Xlib missing on 0.0.. gldrv missing etc. RHLinuxGUY Linux - Games 3 05-21-2006 11:02 PM
missing something simple in 3 NIC configuration qweqwe Linux - Networking 4 06-16-2003 01:55 AM

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

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