[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian Wheezy 7.4 apt-cacher can only access from localhost



On 20/03/14 06:41, Rick McCombs AD5DU wrote:
> On Wed, Mar 19, 2014 at 2:36 AM, Scott Ferguson
> <scott.ferguson.debian.user@gmail.com> wrote:
>> On 19/03/14 18:18, Rick McCombs AD5DU wrote:
>>> I installed Debian Wheezy 7.4 on my Tower and my laptop.
>>> I installed apt-cacher on the tower and it work when I use it from localhost.
>>
>> Do you mean "apt-cacher" or "apt-cacher-ng"??
> 
> apt-cacher.
>>
>>> I did not change the default config, which allows connections from any host.
>>
>> Are you sure? (Perhaps the default config has changed since I last used
>> it instead of apt-cacher-ng)

Your belief is incorrect. The default config has not changed (which is
why I asked you to post it).

>>
>> Please post the output of:-
>> $ grep "allowed_hosts" /etc/apt-cacher/apt-cacher.conf
> 
> root@ricks-hp:~#  grep "allowed_hosts" /etc/apt-cacher/apt-cacher.conf
> # addresses must be matched by allowed_hosts and not by denied_hosts to be
> # permitted to use the cache.  Setting allowed_hosts to "*" means "allow all"
> # hostname.  The corresponding IPv6 options allowed_hosts_6 and denied_hosts_6
> # added directly to allowed_hosts and denied_hosts along with IPv4 addresses.
> #allowed_hosts = *

Thanks

> 
> It is commented out but that is supposed to be the default.

The default is *not* to allow access from all hosts.

Uncomment that last quoted line, or add a line:-
allowed_hosts=$my_subnet   (replace that with the actual subnet)
OR
allowed_hosts=$my_laptop (replace that with the static IP address of
your laptop)
OR just uncomment it and rely on no port forwarding from your firewall
to restrict connections to your LAN

> 
> I don't have much time right now. I may try some variations later
> tonight or tomorrow.
> I think I read something on the web about a bug and  disabling ipv6
> was a work around, but I'm not sure.
> I may try it.
> 


It's not a bug.
I suggest you read comments in /etc/apt-cacher/apt-cacher.conf, and if
that isn't clear enough - try "man apt-cacher".


Kind regards


Reply to: