ftp and telnet: connection refused

ftp and telnet: connection refused

Post by Will » Thu, 04 Jul 2002 07:06:17



(I searched Google Groups looking for answers to this problem, so I included
many of the diagnostics I saw asked for for this type of problem)

I am trying to set up an ftp server using wu-ftpd on my linux PC so that
I can
transfer files between it and my Sharp Zaurus, a linux-based PDA. I can
set up
a ppp connection through the USB cradle, and I have successfully ping'd
in both
directions, telnet'd PC->PDA, and accessed my PC's webserver from the PDA's
browser. I am unable to ftp or telnet PDA->PC, however, I can telnet and ftp
the PC to itself (not very useful), even using its address in the PDA-PC
network (192.168.1.1). I always get a "Connection refused" error before
I can
log in from the PDA. My /etc/hosts.(allow|deny) and /etc/ftpusers files are
empty. /etc/xinetd.d/(telnet|ftp) both contain "disable=no" Here they are:

service telnet
{
    flags        = REUSE
    socket_type    = stream      
    wait        = no
    user        = root
    server        = /usr/sbin/in.telnetd
    log_on_failure    += USERID
    disable        = no

Quote:}

service ftp
{
    flags        = REUSE
    only_from    = 192.168.1.2 192.168.1.1
    socket_type    = stream      
    wait        = no
    user        = root
    server        = /usr/sbin/in.ftpd
    server_args    = -l -a
    log_type    = FILE /var/log/ftplog
    log_on_failure    += USERID
    disable        = no

Quote:}

And here's /etc/ftpaccess (untouched from how wu-ftpd installed it):

class   all   real,guest,anonymous  *

limit   all   10   Any              /etc/msgs/msg.dead

readme  README*    login
readme  README*    cwd=*

message /welcome.msg            login
message .message                cwd=*

compress        yes             all
tar             yes             all

log commands real
log transfers anonymous,real inbound,outbound

shutdown /etc/shutmsg


I had to fudge the /etc/xinetd.d/ftp file by copying the telnet file and
modifying it. I did this before I realized that telnet didn't work
either. Here
are the outputs of some commands I saw suggested (run on the PC):

# netstat -nl |grep 21
tcp    0    0 0.0.0:21    0,0,0:*        LISTEN

# ipchains -L
Chain input (policy ACCEPT):
target    prot opt    source        destination    ports
ACCEPT    udp  ------    216.238.0.10    anywhere    domain -> any
ACCEPT    tcp  -y----    anywhere    anywhere    any ->    http
ACCEPT    all  ------    anywhere    anywhere    n/a
REJECT    tcp  -y----    anywhere    anywhere    any ->    0:1023
REJECT    tcp  -y----    anywhere    anywhere    any ->    nfs
REJECT    udp  ------    anywhere    anywhere    any ->    0:1023
REJECT    udp  ------    anywhere    anywhere    any ->    nfs
REJECT    tcp  -y----    anywhere    anywhere    any ->    x11:6009
REJECT    tcp  -y----    anywhere    anywhere    any ->    xfs

(216.238.0.10 is my ISP's DNS)

# ifconfig ppp0
ppp0    Link encap:Point-to-Point Protocol
    inet addr:192.168.1.1  P-t-P:192.1.2  Mask:255.255.255.255
    UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
    RX packets:8 errors:0 dropped:0 overruns:0 frame:0
    TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:3

Here are the commands I use to set up PPP:
on the PC:
# pppd /dev/ttyUSB0 noauth 192.168.1.1:192.168.1.2
on the PDA:
# pppd /dev/ttyUSB0 defaultroute usepeerdns

Any suggestions?

(I hope I've given enough information ;)

-- Will
Seeing is believing; You wouldn't have seen it if you didn't believe it.

 
 
 

ftp and telnet: connection refused

Post by Louis Boy » Thu, 04 Jul 2002 10:16:46



> (I searched Google Groups looking for answers to this problem, so I included
> many of the diagnostics I saw asked for for this type of problem)

> I am trying to set up an ftp server using wu-ftpd on my linux PC so that
> I can
> transfer files between it and my Sharp Zaurus, a linux-based PDA. I can
> set up
> a ppp connection through the USB cradle, and I have successfully ping'd
> in both
> directions, telnet'd PC->PDA, and accessed my PC's webserver from the PDA's
> browser. I am unable to ftp or telnet PDA->PC, however, I can telnet and ftp
> the PC to itself (not very useful), even using its address in the PDA-PC
> network (192.168.1.1). I always get a "Connection refused" error before
> I can
> log in from the PDA. My /etc/hosts.(allow|deny) and /etc/ftpusers files are
> empty. /etc/xinetd.d/(telnet|ftp) both contain "disable=no" Here they are:

> service telnet
> {
>     flags        = REUSE
>     socket_type    = stream
>     wait        = no
>     user        = root
>     server        = /usr/sbin/in.telnetd
>     log_on_failure    += USERID
>     disable        = no
> }

> service ftp
> {
>     flags        = REUSE
>     only_from    = 192.168.1.2 192.168.1.1
>     socket_type    = stream
>     wait        = no
>     user        = root
>     server        = /usr/sbin/in.ftpd
>     server_args    = -l -a
>     log_type    = FILE /var/log/ftplog
>     log_on_failure    += USERID
>     disable        = no
> }

> And here's /etc/ftpaccess (untouched from how wu-ftpd installed it):

> class   all   real,guest,anonymous  *

> limit   all   10   Any              /etc/msgs/msg.dead

> readme  README*    login
> readme  README*    cwd=*

> message /welcome.msg            login
> message .message                cwd=*

> compress        yes             all
> tar             yes             all

> log commands real
> log transfers anonymous,real inbound,outbound

> shutdown /etc/shutmsg


> I had to fudge the /etc/xinetd.d/ftp file by copying the telnet file and
> modifying it. I did this before I realized that telnet didn't work
> either. Here
> are the outputs of some commands I saw suggested (run on the PC):

> # netstat -nl |grep 21
> tcp    0    0 0.0.0:21    0,0,0:*        LISTEN

> # ipchains -L
> Chain input (policy ACCEPT):
> target    prot opt    source        destination    ports
> ACCEPT    udp  ------    216.238.0.10    anywhere    domain -> any
> ACCEPT    tcp  -y----    anywhere    anywhere    any ->    http
> ACCEPT    all  ------    anywhere    anywhere    n/a
> REJECT    tcp  -y----    anywhere    anywhere    any ->    0:1023
> REJECT    tcp  -y----    anywhere    anywhere    any ->    nfs
> REJECT    udp  ------    anywhere    anywhere    any ->    0:1023
> REJECT    udp  ------    anywhere    anywhere    any ->    nfs
> REJECT    tcp  -y----    anywhere    anywhere    any ->    x11:6009
> REJECT    tcp  -y----    anywhere    anywhere    any ->    xfs

> (216.238.0.10 is my ISP's DNS)

> # ifconfig ppp0
> ppp0    Link encap:Point-to-Point Protocol
>     inet addr:192.168.1.1  P-t-P:192.1.2  Mask:255.255.255.255
>     UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
>     RX packets:8 errors:0 dropped:0 overruns:0 frame:0
>     TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
>     collisions:0 txqueuelen:3

> Here are the commands I use to set up PPP:
> on the PC:
> # pppd /dev/ttyUSB0 noauth 192.168.1.1:192.168.1.2
> on the PDA:
> # pppd /dev/ttyUSB0 defaultroute usepeerdns

> Any suggestions?

> (I hope I've given enough information ;)

> -- Will
> Seeing is believing; You wouldn't have seen it if you didn't believe it.

I belive in.ftpd and in.telnetd have to set in hosts.allow  (or you could use
the more dangerous ALL:ALL
in hosts.allow)

in.ftpd:ALL             (if you want acess from any host) or
in.ftpd:192.168.1 192.168.3.99 ......  (or whatever hosts or networks you want
to have access)

(and not disallowed in hosts.deny)
---
Lou Boyd

 
 
 

ftp and telnet: connection refused

Post by Will » Thu, 04 Jul 2002 11:22:54


<snipped for size>

Quote:>>log in from the PDA. My /etc/hosts.(allow|deny) and /etc/ftpusers files are
>>empty. /etc/xinetd.d/(telnet|ftp) both contain "disable=no" Here they are:

<snipped again>

Quote:>I belive in.ftpd and in.telnetd have to set in hosts.allow  (or you could use
>the more dangerous ALL:ALL
>in hosts.allow)

>in.ftpd:ALL             (if you want acess from any host) or
>in.ftpd:192.168.1 192.168.3.99 ......  (or whatever hosts or networks you want
>to have access)

>(and not disallowed in hosts.deny)
>---
>Lou Boyd

putting this in hosts.allow didn't help:

in.ftpd:192.168.1.1 192.168.1.2
in.telnetd:192.168.1.1 192.168.1.2

--
Seeing is believing; You wouldn't have seen it if you didn't believe it.

 
 
 

ftp and telnet: connection refused

Post by Will » Mon, 08 Jul 2002 03:26:39


I found the nmap and tcpdump utilities very informative, but they didn't
reall help me to figure out why I can't ftp from my PDA (Zaurus) to my
PC. Maybe the output will make more sense to someone else.

Here's the output of tcpdump on the PC after the same command:
nmap PC -P0 -p 21 --host_timeout 500
is run on first the PC, then the Zaurus:

13:28:59.017004   lo > PC.33101 > PC.ftp: S 3635139294:3635139294(0) win
32767 <mss 16396,sackOK,timestamp 2013798 0,nop,wscale 0> (DF)
13:28:59.017004   lo < PC.33101 > PC.ftp: S 3635139294:3635139294(0) win
32767 <mss 16396,sackOK,timestamp 2013798 0,nop,wscale 0> (DF)
13:28:59.017004   lo > PC.ftp > PC.33101: S 3638028145:3638028145(0) ack
3635139295 win 32767 <mss 16396,sackOK,timestamp 2013798
2013798,nop,wscale 0> (DF)
13:28:59.017004   lo < PC.ftp > PC.33101: S 3638028145:3638028145(0) ack
3635139295 win 32767 <mss 16396,sackOK,timestamp 2013798
2013798,nop,wscale 0> (DF)
13:28:59.017004   lo > PC.33101 > PC.ftp: . 1:1(0) ack 1 win 32767
<nop,nop,timestamp 2013798 2013798> (DF)
13:28:59.017004   lo < PC.33101 > PC.ftp: . 1:1(0) ack 1 win 32767
<nop,nop,timestamp 2013798 2013798> (DF)
13:28:59.037004   lo > PC.ftp > PC.33101: P 1:87(86) ack 1 win 32767
<nop,nop,timestamp 2013800 2013798> (DF) [tos 0x10]
13:28:59.037004   lo < PC.ftp > PC.33101: P 1:87(86) ack 1 win 32767
<nop,nop,timestamp 2013800 2013798> (DF) [tos 0x10]
13:28:59.037004   lo > PC.33101 > PC.ftp: . 1:1(0) ack 87 win 32767
<nop,nop,timestamp 2013800 2013800> (DF)
13:28:59.037004   lo < PC.33101 > PC.ftp: . 1:1(0) ack 87 win 32767
<nop,nop,timestamp 2013800 2013800> (DF)
13:28:59.037004   lo > PC.33101 > PC.ftp: R 1:1(0) ack 87 win 32767
<nop,nop,timestamp 2013800 2013800> (DF)
13:28:59.037004   lo < PC.33101 > PC.ftp: R 1:1(0) ack 87 win 32767
<nop,nop,timestamp 2013800 2013800> (DF)
13:29:03.377004 ppp0 < Zaurus.1038 > PC.ftp: S 3601867083:3601867083(0)
win 5840 <mss 1460,sackOK,timestamp 2495495 0,nop,wscale 0> (DF)
13:29:03.377004 ppp0 > PC > Zaurus: icmp: PC tcp port ftp unreachable
(DF) [tos 0xc0]

Any ideas?

-- Will
Seeing is believing; You wouldn't have seen it if you didn't believe it.

 
 
 

ftp and telnet: connection refused

Post by Jeffr » Sun, 04 Aug 2002 06:41:12



> I found the nmap and tcpdump utilities very informative, but they didn't
> reall help me to figure out why I can't ftp from my PDA (Zaurus) to my
> PC. Maybe the output will make more sense to someone else.

> Here's the output of tcpdump on the PC after the same command:
> nmap PC -P0 -p 21 --host_timeout 500
> is run on first the PC, then the Zaurus:

> 13:28:59.017004   lo > PC.33101 > PC.ftp: S 3635139294:3635139294(0) win
> 32767 <mss 16396,sackOK,timestamp 2013798 0,nop,wscale 0> (DF)
> 13:28:59.017004   lo < PC.33101 > PC.ftp: S 3635139294:3635139294(0) win
> 32767 <mss 16396,sackOK,timestamp 2013798 0,nop,wscale 0> (DF)
> 13:28:59.017004   lo > PC.ftp > PC.33101: S 3638028145:3638028145(0) ack
> 3635139295 win 32767 <mss 16396,sackOK,timestamp 2013798
> 2013798,nop,wscale 0> (DF)
> 13:28:59.017004   lo < PC.ftp > PC.33101: S 3638028145:3638028145(0) ack
> 3635139295 win 32767 <mss 16396,sackOK,timestamp 2013798
> 2013798,nop,wscale 0> (DF)
> 13:28:59.017004   lo > PC.33101 > PC.ftp: . 1:1(0) ack 1 win 32767
> <nop,nop,timestamp 2013798 2013798> (DF)
> 13:28:59.017004   lo < PC.33101 > PC.ftp: . 1:1(0) ack 1 win 32767
> <nop,nop,timestamp 2013798 2013798> (DF)
> 13:28:59.037004   lo > PC.ftp > PC.33101: P 1:87(86) ack 1 win 32767
> <nop,nop,timestamp 2013800 2013798> (DF) [tos 0x10]
> 13:28:59.037004   lo < PC.ftp > PC.33101: P 1:87(86) ack 1 win 32767
> <nop,nop,timestamp 2013800 2013798> (DF) [tos 0x10]
> 13:28:59.037004   lo > PC.33101 > PC.ftp: . 1:1(0) ack 87 win 32767
> <nop,nop,timestamp 2013800 2013800> (DF)
> 13:28:59.037004   lo < PC.33101 > PC.ftp: . 1:1(0) ack 87 win 32767
> <nop,nop,timestamp 2013800 2013800> (DF)
> 13:28:59.037004   lo > PC.33101 > PC.ftp: R 1:1(0) ack 87 win 32767
> <nop,nop,timestamp 2013800 2013800> (DF)
> 13:28:59.037004   lo < PC.33101 > PC.ftp: R 1:1(0) ack 87 win 32767
> <nop,nop,timestamp 2013800 2013800> (DF)
> 13:29:03.377004 ppp0 < Zaurus.1038 > PC.ftp: S 3601867083:3601867083(0)
> win 5840 <mss 1460,sackOK,timestamp 2495495 0,nop,wscale 0> (DF)
> 13:29:03.377004 ppp0 > PC > Zaurus: icmp: PC tcp port ftp unreachable
> (DF) [tos 0xc0]

> Any ideas?

> -- Will
> Seeing is believing; You wouldn't have seen it if you didn't believe it.

It could be your ipchains rule is blocking telnet request.  Try this
to disable your input ipchains rule:

# ipchains -F input

Good Luck,

--- Jeffrey

 
 
 

1. Reconfiguring network card - was Telnet/FTP refuse connection

This intended as a followup & re-direct to the posting I did previously
related to reconfiguring a Solaris 2.5.1 (x86) box onto a network.  The
previous title was identified as telnet & ftp refuse connections after
reconfig onto the network.

Somewhat embarassed, but a duplicate IP address for the newly installed box
was found,  hence the symptoms.

Now, the "real" problem seems to be:
(1) I'm using a 3COM 3C503 card that supports BNC, AUI & TP connections.
It's ugly I know, but considering the supported cards & the locations where
I bought it -- it was my only choice (suggestions welcome).

(2) I initially configured the machine on a Linksys TP hub & later
reconfigured it (tried) at an ISP that cabled up a BNC (different port)
connection.

(3) When the machine boots, it believes the ethernet I/F is elx0 --
shouldn't this be elx ??

Do I:
(a) Get an external BNC transceiver & an AUI cable?
(b) Get a small hub with a BNC port?
(c) Try to modify the /platform/i86pc/kernel/drv/elx.conf to support the
BNC?

If I try (c) what do I need to do???????  Are there ifconfig flags to set
IRQ/DMA addresses??  Are there release notes for this card that I'm not
aware of??

Any and all suggestions are appreciated,

TIA,
Larry

2. Konsole in KDE 2.1

3. telnet and ftp connection refused

4. Poorly Rendered Fonts XFree-4.0-0.8/NVIDIA 0.9.2/GeForce256

5. newbie: COL2.2 - FTP/telnet refuse connection

6. Apache or NCSA1.4 for heavy Linux?

7. Connection refused -- how to telnet(ftp,rlogin, etc) my own machine?

8. Well, how does .NET client render and display XML?

9. ftp & telnet,connection refused

10. Connection refused error by incoming ftp and telnet

11. NFS, ftp, telnet Connection refused

12. Connection Refused Message when trying to TELNET or FTP

13. HELP: Connection refused Telnet/FTP