Subject: Re: pkgsrc: ftp connections continually time out. Not behind firewall or switch
To: <>
From: Ignatios Souvatzis <ignatios@cs.uni-bonn.de>
List: netbsd-users
Date: 01/11/2007 12:40:03
On Thu, Jan 11, 2007 at 11:09:17AM +1100, alasdair wrote:
> At 01:43 AM 10/01/07, you wrote:
> >Hello,
> >
> >On Wed, Jan 10, 2007 at 12:15:31AM +1100, Alasdair wrote:
> > > NetBSD 3.01
> > >
> > > Problem: On attempting to fetch packages using pkgsrc the connections
> > > continually time out. With  the error message "Connection timed out" .
> > >
> > > In my previous experience (with a previous system set-up) this may 
> > happen a
> > > few times then eventually the system finds a site to log onto and 
> > downloads
> > > the package.  So far I have only been able to download "pkgsrc" via CVS ok
> > > and "Links" (text based browser). I have tried to download other packages
> > > over a period of about 4 - 5 days at varying times of day and night 
> > with no
> > > success.
> > > My connection is ok. I can use Links with no problem.
> >
> >Several questions/requests follow:
> >
> >* Did you try
> >
> >PASSIVE_FETCH=1
> >
> >in /etc/mk.conf? [1] If not, please do.
> >
> >* Did you try manual ftp from NetBSD to the problematic sites?
> >* If manual ftp doesn't work, what is the error message?
> >* If manual ftp works - please cut/paste the first few lines of its output
> >
> >* Please show us the output of:
> >- cat /etc/resolv.conf
> >- ifconfig -n -a
> >- netstat -rnf inet
> >- netstat -rnf inet6
> >
> >* Did you enable IPv6 in the windows installation that has working ftp?[2]
> >
> >Regards,
> >         -is
> >
> >[1] See http://www.netbsd.org/Documentation/pkgsrc/faq.html#passive-ftp)
> >
> >[2] You might be a victim of a router that advertizes IPv6 to your
> >     machine, but doesn't really route it. In this case you'll get long
> >     timeouts when ftp is trying to open a ipv6 connection.
> >     Windows XP has IPv6, but the method to enable it is somewhat hidden,
> >     so I suspect it's not enabled in yoru installation.
> 
> Hi Ignatios,
> Thanks for replying. the help is most appreciated. The following tables 
> have been typed in by me manually because email is not configured in the 
> system with the problem, I am not sure how to do it without mutt. So if 
> there are any glaring inconsistencies it will most likely be a typo by me. 
> I have checked as carefully as I can. Please let me know if you need 
> anything clarified.
> 
> Below are are the results of the requests you sent me.
> 
> Regards,
> 
> Alasdair
> 
> I have added the suggested line in /etc/mk.conf. Then tried again same 
> results with a few different pkg.
> Manual ftp was unsuccessful,manual ftp error message follows:
> 
> ftp connect: Connection timed out
> 
> output ends
> 
> cat /etc/resolv.conf  output follows:
> 
> Created by dh client at Thu 11 Jan 09:01:07 EST 2007
> nameserver 192.168.1.254
> 
> output ends
> 
> my system clock is 12hrs out this was produced 21:01:07 Aus EST 2007
> 
> -n -a was not available on my system so I used -a only,  did you mean -m -a 
> ? I can post this if you let me know.
> 
> Output of ifconfig -a
> 
> 
> ifconfig -a
> rtk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>          address: 00:0a:cd:10:d4:f1
>          media: Ethernet autoselect (100baseTX full-duplex)
>          status: active
>          inet 192.168.1.2 netmask 0xffffffc0 broadcast 192.168.1.255
>          inet6 fe80::20a:cdff:fe10:d4f1%rtk0 prefixlen 64 scopeid 0x1

192.168.*.* is *not* an public Internet address.

Ok - so you do NOT have an Internet connection, but are behind some
sort of network address translation gateway. That's the reason that 
ftp doesn't work. Any non-trivial protocol doesn't work behind NAT,
but needs special treatment, and the "active" ftp protocol translators
are of varying quality.

Now, if passive ftp does not work, try active... only that NetBSD's 
ftp program tries passive first, then active.

(For interactive test, "ftp -p" uses passive mode only, "ftp -A" uses
active mode).

One of these should work, as the windows machine can get an FTP connection,
as you claim.

	-is