LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 12-07-2005, 11:55 AM   #1
SPo2
Member
 
Registered: Jun 2005
Posts: 88

Rep: Reputation: 15
Question "Connection refused" while doing a ftp.....


PLs advise..........

i am using RH 9......i am a newbie in linux & i face this problem:
i hv 2 com in a network, both using RH 9, let name them com A & com B, both hv ftp server installed.

- In com A, i can use FTP to retrieve files fr com B but when i use com B to do the same on com A, i get a "Connection refused" prompt......

PLs correct me in this.............

Also com A is a dual boot sys with winXP NTFS filesystem, i heard Linux has diff logging in NTFS???could this be e problem?

if thats e case, what can i do????

PLs advise....thanks so much.....
 
Old 12-07-2005, 01:41 PM   #2
zaphod_es
Member
 
Registered: Jun 2003
Location: Brazil
Distribution: Ubuntu
Posts: 134

Rep: Reputation: 15
Are you running a ftp server on machine B? If you are not sure try this command:
ps aux |grep ftp

It should identify any daemon running a ftp service.

When two computers network with each other they communicate using network protocols like ftp, http, ssh and so on. Each computer reads its own drives and so it is completely irrelevant what OS or file system the remote system uses.

As a matter of interest if you are running two Linux boxes you should take a look at ssh and scp which are very useful to access and transfer files between the two machines. For Windows networking it is best to use Samba which is available on almost all distros.

ZB
 
Old 12-07-2005, 01:44 PM   #3
zaphod_es
Member
 
Registered: Jun 2003
Location: Brazil
Distribution: Ubuntu
Posts: 134

Rep: Reputation: 15
I am not sure my answer was totally clear. You said that both had ftp installed. What I meant is that the program has to be run as well as be installed.

The second thought is maybe a firewall is running on machine B.

ZB
 
Old 12-08-2005, 11:44 AM   #4
SPo2
Member
 
Registered: Jun 2005
Posts: 88

Original Poster
Rep: Reputation: 15
HI ZAPHOD_ES

thanks for ur help.....

i tried with: ps aux | grep ftp & both com show something like this:

Username 6179 0.0 0.1 2312 234 pts/0 S 00:43 grep ftp
/usr/sbin/vsftp /etc/vsftp/vsftpd.conf
-------------------------------------------------------

To disable firewall in RH9 is in file redhat-config-securitylevel, then add in: --none.

Am i right on that command?

I have change the firewall settings on both machine & i check the physical connection....but i stll get the "connection refused"

pls advise
 
Old 12-08-2005, 12:38 PM   #5
zaphod_es
Member
 
Registered: Jun 2003
Location: Brazil
Distribution: Ubuntu
Posts: 134

Rep: Reputation: 15
It looks as though you are not running the vsftpd daemon Your result

Username 6179 0.0 0.1 2312 234 pts/0 S 00:43 grep ftp
/usr/sbin/vsftp /etc/vsftp/vsftpd.conf

Shows everything running with the letters ftp in the file name
grep ftp is the search itself
/usr/sbin/vsftp is, I presume the client running to access the other box
/etc/vsftp/vsftpd.conf is the configuration file for the server. I guess it was open in an editor?

Whatever the last two are they are not the daemon (server means the same thing)

So fire up the server. To run it once you just enter vsftpd as a command. To run on startup and at all the time you need to add it to your services.


To add vsftpd to the startup list, execute:
# chkconfig –add vsftpd

To list the services that are configured to startup at run-level 3 (Redhat’s default run-level), execute the following as root:
# chkconfig –list |grep “3n”

Don't worry, you are going about it the right way. If this does not fix it come back. If I cannot get it working someone else will.
 
Old 12-08-2005, 02:12 PM   #6
SPo2
Member
 
Registered: Jun 2005
Posts: 88

Original Poster
Rep: Reputation: 15
HI,

thanks for you encouragement!!!

i ran e commmands # chkconfig --list vsftpd
--> & its shows this
: 0ff 1ff 2ff 3ff 4ff 5n 6ff

what does that implys?
I am on run level 5?

i tried to use #chkconfig --list vsftpd | grep 3n

it still return with e above --> 5n

pls advise
 
Old 12-08-2005, 02:53 PM   #7
zaphod_es
Member
 
Registered: Jun 2003
Location: Brazil
Distribution: Ubuntu
Posts: 134

Rep: Reputation: 15
That means that the daemon is started on boot up at level 5, that is with the Gui and where you usually run the machine. I would have expected it to start at level 3 but if you always use the gui it does not matter. If it is running it should respond to the other box.

Do you get the same output if you run the ps command again? Did you run chkconfig –add vsftpd ? If you did that it would have added the service. If you have not logged out or rebooted you will should run:
# chkconfig start vsftpd

That will start the service and should show up in the ps output. If it does but still does not respond to the other machine compare the two /etc/csftp/vsftpd.conf files.

Think of the bright side - you only have to do this once and you will have learned some stuff that will help you the next time you need to play around with services

ZB
 
Old 12-09-2005, 01:08 AM   #8
SPo2
Member
 
Registered: Jun 2005
Posts: 88

Original Poster
Rep: Reputation: 15
Hi there,

Will do that & compare e files.....
 
Old 12-09-2005, 01:10 AM   #9
SPo2
Member
 
Registered: Jun 2005
Posts: 88

Original Poster
Rep: Reputation: 15
Thanks so much for e help & will ask u if face any hipcups............

 
Old 12-09-2005, 08:43 AM   #10
SPo2
Member
 
Registered: Jun 2005
Posts: 88

Original Poster
Rep: Reputation: 15
Hi,

U were saying on protocols like ssh & rcp earlier,
so they provide more security over the networks rite?
i guess in the market these days, no 1 uses ftp // telnet anymore?

what are the more common one nowadays?

thanks
 
Old 12-09-2005, 05:25 PM   #11
zaphod_es
Member
 
Registered: Jun 2003
Location: Brazil
Distribution: Ubuntu
Posts: 134

Rep: Reputation: 15
On your private network with a single user security is not a major concern so you can use ftp, rlogin, telnet, rcp and anything else without any risk.

On the other hand there is no reason not to use the more secure sftp, ssh, scp programs which do the same thing but encrypted. When and if you need to use these programs on external networks they will be familar.

Regarding ftp: most ftp servers are public and allow anyone to log in and download. Clearly here encryption would be silly. If you wanted to access your own computer from the outside using ftp you would want a secure login to exclude the curious. I do not know wsftp but from a quick look at their web page it seems fine. The s in wsftp stand for secure.
 
Old 12-10-2005, 01:10 PM   #12
SPo2
Member
 
Registered: Jun 2005
Posts: 88

Original Poster
Rep: Reputation: 15
Hi

Thanks for your info........
And also i hv solved my initial connection problem, indeed it was the setting of firewalls that restricted access.

thanks again...
 
Old 12-13-2005, 12:00 PM   #13
zaphod_es
Member
 
Registered: Jun 2003
Location: Brazil
Distribution: Ubuntu
Posts: 134

Rep: Reputation: 15
Well done, at least it is sorted now. When there is a networking problem the first thing to look at is the firewall, so often that is the cause.

ZB
 
Old 12-14-2005, 12:34 AM   #14
SPo2
Member
 
Registered: Jun 2005
Posts: 88

Original Poster
Rep: Reputation: 15
hI THanks...

In vsFTP, if i wanna restrict the users that login,

i go /etc/hosts.allow file & add line : vsftpd only_from = 192.x.x.x

&

in vsftpd.conf file, i comment the "# anonymous login" & that should only allow the hosts com from /etc/hosts.allow to login right?

But when i set that, other com with diff ipaddr can still login.....& get files......Where is my wrong steps? Does firewall be a matter in this case? i checked eth0 as trusted device but not others.....

pls advise.........
 
Old 12-14-2005, 01:51 PM   #15
zaphod_es
Member
 
Registered: Jun 2003
Location: Brazil
Distribution: Ubuntu
Posts: 134

Rep: Reputation: 15
Sorry, this is too specialist as it involves Red Hat and vsFTP neither of whichI know much about. I suggest that you post it as a new question
ZB
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
ircd.conf: "Connection failed. Error: Connection refused" hamish Linux - Software 3 03-10-2005 08:23 AM
suse 9.2 proffesional wlan problem "connection refused" doughustad Linux - Hardware 1 01-24-2005 07:14 PM
What is "Xlib: connection to ":0.0" refused by server " rack201 Linux - Software 1 02-04-2004 08:49 AM
lp filename yields "cannot open connection to localhost - Connection refused" jjge Linux - General 3 12-29-2003 12:02 AM
bind and named and "rndc: connect failed: connection refused" coffee9876 Linux - Networking 3 12-16-2003 11:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:45 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration