Welcome! Log In Create A New Profile

Advanced

distcc remote host deny client [SOLVED]

Posted by bodhi 
distcc remote host deny client [SOLVED]
August 03, 2013 04:45PM
I'm setting up distcc and kept getting this denied by access list error. Could not fingure out why.

The compiling host is 192.168.0.224, the remote host (volunteer) is 192.168.0.228. I've turned on debug in /etc/init.d/distcc and got these error info on 192.168.0.228:

Remote host denied access log:
distccd[26818] (dcc_check_client) connection from ::ffff:192.168.0.224:40342
distccd[26818] (check_address_inet) deny client 0xc0a800e0, value 0xe000a8c0, mask 0xffffffff
distccd[26818] (check_address_inet) deny client 0xc0a800e0, value 0xe400a8c0, mask 0xffffffff
distccd[26818] (dcc_check_client) ERROR: connection from client '::ffff:192.168.0.224:40342' denied by access list

IPv4 Subnet Mask Calculator showed
IP Address: 192.168.0.224/24 ( 0xC0A800E0 )

IPv4 Subnet Mask Calculator showed
IP Address: 224.0.168.192/26 ( 0xE000A8C0 )

Anybody knows what this error mean? and why the value was reversed like this?

Thanks!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 08/04/2013 03:03PM by bodhi.
Re: distcc remote host deny client [SOLVED]
August 04, 2013 03:34PM
It turned out to be a configuration problem with distcc.

My hunch was this problem has to do with the IP mask (why IPv6?). After checking the ports on both server and client I noticed that on the remote box, distcc was listening on port 3632 with tcp6. On the compiling box, distcc was listening on port 3632 with tcp.

netstat -an | grep 3632
tcp        0      0 0.0.0.0:3632            0.0.0.0:*               LISTEN     

netstat -an | grep 3632
tcp6       0      0 :::3632                 :::*                    LISTEN

With the correct search keywords, Google told me this quirk (not really a bug or a feature) existed since 2004 :) Current distcc version straight out of Debian repository has --enable-rfc2553 in the build. So distcc always uses IPv6 to listen to this port.

The solution is to force the remote box to listen on 3632 with tcp. But there is no option to do that when we start distcc. The trick is to set distcc to listen to an IPv4 address:

cat /etc/default/distcc | grep -i listen 
# Which interface should distccd listen on?
# LISTENER="127.0.0.1"
LISTENER="0.0.0.0"

This implicitly tells distcc that port 3632 should be IPv4 !!! and that was it. Port 3632 is now tcp. So when the compiling box sends a request to the remote box, it was resolved as an IPv4 address, and that matches the distcc rules defined to allow/reject connections (which is in IPv4 format: 192.168.0.0/24).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 2 time(s). Last edit at 08/04/2013 08:19PM by bodhi.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: