Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Connection reset by peer (SSH, FTP)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
chy168
n00b
n00b


Joined: 12 Mar 2005
Posts: 70

PostPosted: Sun Oct 30, 2005 11:06 am    Post subject: Connection reset by peer (SSH, FTP) Reply with quote

hi,
when I use ftp client to connect my FTP Server.
I can login it, but I type 'ls' to show the file list.
I'll get the err mesg and disconnected
Code:
netin:Connection reset by peer

when I put my file, i get
Code:
netout: Connection reset by peer


when I connect to SSH, I'll get the error,too.
Code:
Read from remote host test.abc.ooxx.com: Connection reset by peer
Connection to test.abc.ooxx.com closed.


what happened on my Genoo ? :(


thank you. :p
Back to top
View user's profile Send private message
egberts
Guru
Guru


Joined: 04 Nov 2003
Posts: 338
Location: Dimmed Cathode Ray Tube

PostPosted: Mon Oct 31, 2005 2:02 am    Post subject: Reply with quote

Most likely candidate of your problem is your firewall is dropping your FTP data connection.

As you recall, FTP is composed of two TCP sessions:

1. Control - the ones that handles all your commands (LS, DIR, GET)
2. Data - the ones that actually carries the content of the file (including directory listings)

Your firewall works well with #1. But it is blocking #2.

Try this again using 'passive', by doing this at your FTP prompt BEFORE doing any #2 related commands.


Code:
~ $ ftp ftp.redhat.com
Connected to ftp.redhat.com.
220 Red Hat FTP server ready. All transfers are logged. (FTP) [no EPSV]
Name (ftp.redhat.com:steve): anonymous
530 Please login with USER and PASS.
SSL not available
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> passive
Passive mode on.
ftp>


Please NOTE the word 'passive' used in above example.

If that works, then you have two choices:

1. Ensure that all FTP sessions have 'passive' command done.
# ftp -p ftp.redhat.com

2. Adjust your firewall so that you let out more FTP-DATA TCP connections
_________________
Clusters of Fry's Special, AMD 2200, 2 GB DDR, 220 GB (2008.1/desktop, stage 1, -O3) x8
HP Compaq Fry's SPecial, AMD 2100, 2 GB DDR, 260 GB (2008.0/server, stage 1, -O3)
Ultra Sparc 5, 256MB, 3GB (2006.1/server, stage 1, -O3)
Back to top
View user's profile Send private message
chy168
n00b
n00b


Joined: 12 Mar 2005
Posts: 70

PostPosted: Mon Oct 31, 2005 2:59 pm    Post subject: Reply with quote

hi egberts, I've tried your tips.
but, I got some strange error.

Code:
root@NB:/home/chy168/Desktop# ftp -p sun8.csie.thu.edu.tw
Connected to test.abc.ooxx.com
220 ProFTPD 1.2.10 Server (Welcome to FTP) [123.45.6.7]
Name (test.abc.ooxx.com:chy168):
331 Password required for chy168.
Password:
l230 User chy168 logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (123,45,6,7,129,23).


"sometimes" I log in the FTP and 'ls' all my files. I can get the whole list.
but after a few second, I cannot 'ls' my files again.

it will show :
Code:
227 Entering Passive Mode (123,45,6,7,129,23).

and hang.


"sometimes" I log in my FTP and 'ls'.
I can get a part of file list, and it will tell me.
Code:
Connection reset by peer


My ssh also has the same condition.

is it still a problem in my Firewall ?

what item in firewall should I adjust ?

thank you very much.. thank you ^^..
Back to top
View user's profile Send private message
egberts
Guru
Guru


Joined: 04 Nov 2003
Posts: 338
Location: Dimmed Cathode Ray Tube

PostPosted: Tue Nov 01, 2005 8:26 pm    Post subject: Reply with quote

Need to know two things:

Are you running a NAT firewall? That is, do you use private IP address such as 10..x.x.x or 192.168.x.x (or even 172.28.x.x)

Are you running over DSL?
_________________
Clusters of Fry's Special, AMD 2200, 2 GB DDR, 220 GB (2008.1/desktop, stage 1, -O3) x8
HP Compaq Fry's SPecial, AMD 2100, 2 GB DDR, 260 GB (2008.0/server, stage 1, -O3)
Ultra Sparc 5, 256MB, 3GB (2006.1/server, stage 1, -O3)
Back to top
View user's profile Send private message
chy168
n00b
n00b


Joined: 12 Mar 2005
Posts: 70

PostPosted: Sun Nov 27, 2005 2:12 am    Post subject: Reply with quote

egberts wrote:
Need to know two things:

Are you running a NAT firewall? That is, do you use private IP address such as 10..x.x.x or 192.168.x.x (or even 172.28.x.x)

Are you running over DSL?


Yes.

I'm in a NAT network, and I use private IP address.
This network has firewall.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum