Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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 installed lftp in remote machine over kvm with ip 192.168.100.230 and tried to connect other machine over same network 192.168.100.193.I was able to as I could see the prompt but I could not execute any command as it would say "delaying before reconnect"and would never connect(screenshot)
I installed lftp in remote machine over kvm with ip 192.168.100.230 and tried to connect other machine over same network 192.168.100.193.I was able to as I could see the prompt but I could not execute any command as it would say "delaying before reconnect"and would never connect(screenshot)
You have no network or firewall problems, and the server is running, as you are obviously able to connect to it. What ftp software is on ...193, and what do you find in its log files?
You have no network or firewall problems, and the server is running, as you are obviously able to connect to it. What ftp software is on ...193, and what do you find in its log files?
I donot find log files being updated in 192.168.100.193 but there is certainly something that comes up on 230 in /var/log/messages.As I am a newbie I donot know what it is and if it is something related to lftp(screenshot).I have installed vsftp on 193.
I donot find log files being updated in 192.168.100.193 but there is certainly something that comes up on 230 in /var/log/messages.As I am a newbie I donot know what it is and if it is something related to lftp(screenshot).I have installed vsftp on 193.
This is about DHCP, not FTP.
Since you mention KVM, I guess you are running Red Hat or a Red Hat clone like Centos. Let us know if I am wrong. If I am right, the default FTP server is therefore vsftpd.
To double-check, as root run netstat -lnp|grep ':21' on 192.168.100.193. Do you see the vsftpd?
If yes, check the configuration file /etc/vsftpd/vsftpd.conf on 192.168.100.193. Do you find these lines:
xferlog_enable=YES
xferlog_std_format=YES
(they should be there by default)
In the same configuration file, what is the value of xferlog_file? This is the log file you need to look at.
If you play around with virtual machines on a Linux system, I suggest you acquire a minimum of system administration skills. http://www.linuxquestions.org/questi...ks-4175433508/ has a few suggestions (don't start with Linux from Scratch, though).
Since you mention KVM, I guess you are running Red Hat or a Red Hat clone like Centos. Let us know if I am wrong. If I am right, the default FTP server is therefore vsftpd.
To double-check, as root run netstat -lnp|grep ':21' on 192.168.100.193. Do you see the vsftpd?
If yes, check the configuration file /etc/vsftpd/vsftpd.conf on 192.168.100.193. Do you find these lines:
xferlog_enable=YES
xferlog_std_format=YES
(they should be there by default)
In the same configuration file, what is the value of xferlog_file? This is the log file you need to look at.
If you play around with virtual machines on a Linux system, I suggest you acquire a minimum of system administration skills. http://www.linuxquestions.org/questi...ks-4175433508/ has a few suggestions (don't start with Linux from Scratch, though).
I do find /etc/vsftpd/vsftpd.conf and it does contain
xferlog_enable=YES
xferlog_std_format=YES
but I find the
xferlog_file commented out(has # before it)screenshot.
And as far as books are concerned,a big thanx to your.Novice users like me need such links.
I do find /etc/vsftpd/vsftpd.conf and it does contain
xferlog_enable=YES
xferlog_std_format=YES
but I find the
xferlog_file commented out(has # before it)screenshot.
Then the log file is the default, /var/log/xferlog.
Now, I did think that you could connect, but as SAbhi says, this may not be the case. Typically there are two obstacles:
the firewall blocks the FTP port 21
the FTP server is not running
To check the first question, run iptables -S INPUT as root on the server. If the port is closed, you can open it with iptables -I INPUT 1 -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT, or perhaps you have a GUI and a firewall tool under the System menu that you can use instead (better).
To check the second question, again as root, run service vsftpd status. If it is not running, service vsftpd start.
[root@server1 Desktop]# iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -m physdev --physdev-is-bridged -j ACCEPT
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
[root@server1 Desktop]# service vsftpd status
vsftpd (pid 1630) is running...
Still no luck
Hm.
Let's use a different ftp client. If you have telnet installed on the client system, do a telnet 192.168.100.193 21 and enter some text. If not, you can probably install it with a yum install telnet.
I was only partially correct regarding the vsftpd configuration parameters. The best setting is:
xferlog_enable=YES
xferlog_std_format=NO
This will create a useful log file /var/log/vsftpd.log, which contains both connection and disconnection attempts and file transfers.
So, change your configuration file and restart the daemon with service vsftpd restart. Then try to connect again, either using lftp or telnet, and have a look at /var/log/vsftpd.log. Here is what it looks like on my system:
Code:
Wed Dec 18 16:44:23 2013 [pid 25115] CONNECT: Client "192.168.115.2"
Wed Dec 18 16:44:29 2013 [pid 25114] [ftp] OK LOGIN: Client "192.168.115.2", anon password "sdfsdfsd"
Wed Dec 18 16:44:47 2013 [pid 25122] [ftp] OK DOWNLOAD: Client "192.168.115.2", "/pub/os/TRANS.TBL", 11414 bytes, 1024.12Kbyte/sec
Wed Dec 18 16:44:54 2013 [pid 25122] [ftp] OK DOWNLOAD: Client "192.168.115.2", "/pub/os/GPL", 18092 bytes, 1510.60Kbyte/sec
Last edited by berndbausch; 12-18-2013 at 01:50 AM.
OP tried lftp to login and when we look at the logs:
Quote:
Wed Dec 18 16:44:23 2013 [pid 25115] CONNECT: Client "192.168.115.2"
Wed Dec 18 16:44:29 2013 [pid 25114] [ftp] OK LOGIN: Client "192.168.115.2", anon password "sdfsdfsd
"
This doesn't seems to be a firewall issue but a simple login issue, vsftp may not be correctly configured or user creation could be a issue.
how the vsftp is configured ? are you using virtual users or system users ?
can you paste the conf file here ?
Try logging in from the vsftpd first: ftp [ftp server]
provide username and password.
and see if you log in and if not fetch the logs and tell us what you see.
See my test machine has login like this:
Code:
[root@test ~]# ftp localhost
Connected to localhost.abhi.com.
220 Welcome to Abhi's Test FTP service.
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (localhost:root): sam
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (127,0,0,1,173,156)
150 Here comes the directory listing.
226 Directory send OK.
ftp> bye
221 Goodbye.
and when i connect from an external machine:
C:\Users\Test>ftp 192.168.80.128
Connected to 192.168.80.128.
220 Welcome to Abhi's Test FTP service.
User (192.168.80.128:(none)): sam
331 Please specify the password.
Password:
230 Login successful.
ftp>
In KVM, have you created virtual network for subnet 192.168.100.0? You also need to select that virtual network in both virtual machines... See the screenshot.
In KVM, have you created virtual network for subnet 192.168.100.0? You also need to select that virtual network in both virtual machines... See the screenshot.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.