• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Has anyone gotten Squid and Dansguardian to work on Cygwin?

Antoneo

Diamond Member
Hey guys, I've spent the past couple of days trying to get Squid and Dansguardian to work in Cygwin in Windows 2003 Server in an domain environment. I've gotten Squid to ./configure with NTLM authentication switches and compile but it doesn't work. That is to say, upon checking the access.log, the moment the squid.conf file is edited to allow for NTLM, squid stops functioning.

./configure --enable-win32-service --disable-wccp --disable--wccpv2 --enable-auth=ntlm --enable-ntlm-auth-helpers=mswin_sspi --enable-external-acl-helpers=mswin_lm_group --enable-negotiate-auth-helpers=mswin_sspi

squid.conf settings:
auth_param ntlm program /usr/local/squid/libexec/mswin_ntlm_auth.exe
auth_param ntlm children 5
external_acl_type win_domain_group ttl=300 %LOGIN /usr/local/squid/libexec/mswin_check_lm_group.exe -G
acl localnet proxy_auth REQUIRED src 192.168.1.0/24
acl InetAllow external win_domain_group InternetUsers
http_access allow InetAllow

I haven't had any success with Dansguardian, the thing refuses to compile and I'm at a loss as to how to get it working. The following is what I typed:

./configure -sysconfdir=/etc/dansguardian/ -sysvdir=/etc/ -bindir=/usr/bin/ -mandir=/usr/share/man/ -logdir=/var/log/dansguardian/

I've tried following the instructions posted in the Dansguardian mailing list, but have gotten stuck at "I changed the install target in the Makefile to installdg and added an extra line.

Hrm, well if someone knows how to get these guys working in Cygwin, or even just Dansguardian as I believe it could work with SquidNT, I'd appreciate it very much. I know the easier way to do this would be to deploy them in a separate *nix box but I don't have any spare parts to build one. Plus I need to push GPOs down to the clients.
 
If another box isn't an option, what about virtualization? Installing a small copy of Linux inside VMWare Serve would probably be easier and faster than Cygwin.

I've tried following the instructions posted in the Dansguardian mailing list, but have gotten stuck at "I changed the install target in the Makefile to installdg and added an extra line.

Gotten stuck how? It looks pretty self-explanatory to me.
 
Hi Nothinman, I'm not familiar at all with this stuff. I entered "less Makefile" but didn't see anything resembling install target. Can you point out what he is referring to below?

#Makefile for DansGuardian2.8.0
#
#Don't forget the trailing /

INSTALLPREFIX =
PREFIX =
CONFFILELOCATION = ${PREFIX}/etc/dansguardian/
BINARYLOCATION = ${PREFIX}/usr/bin/
SYSVLOCATION = ${PREFIX}/etc/
CGIBINLOCATION = ${PREFIX}/var/www/cgi-bin/
MANUALFILES =

${PREFIX}/usr/share/man/
LOGLOCATION = ${PREFIX}/var/log/dansguardian/
LOGROTATELOCATION = ${PREFIX}/etc/logrotate.d/
PROXYUSER =

administrator
PROXYGROUP = administrators
PIDDIR = /var/run/
libdir = /usr/lib
CHKCONF = /sbin/chkconfig
CHKCONFIG = /sbin/chkconfig -

-add dansguardian
CHKCONFIGDEL = /sbin/chkconfig --del dansguardian
DEB_RC = /usr/sbin/update-rc.d


################################################################
# Unless you know what you are doing, don't edit below this line

CPP

= g++
OBJ = String.o OptionContainer.o FDTunnel.o ConnectionHandler.o \
DataBuffer.o HTTPHeader.o NaughtyFilter.o RegExp.o

Socket.o \
FatController.o UDSocket.o SysV.o ListContainer.o Ident.o \
HTMLTemplate.o LanguageContainer.o DynamicURLList.o

ImageContainer.o \
FOptionContainer.o ListManager.o md5.o

LIBS = $(libdir)/libz.a
PROG = dansguardian
INSTALLFILES =

dansguardian dansguardian.conf dansguardian.sysv \
bannedphraselist exceptionsitelist dansguardian.pl \


bannedextensionlist bannedmimetypelist pics exceptioniplist \
exceptionuserlist exceptionurllist contentregexplist
CONFIGUREFILES = autoconf/platform.h confdefs.h config.log conftest.subs \
dansguardian.conf config.cache Makefile

logrotation weightedphraselist \
bannedphraselist exceptionphraselist dansguardian.sysv \


logrotate.dansguardian dansguardianf1.conf

PASSVARS = -DPROXYUSER=\"${PROXYUSER}\"
#PASSVARS += -DLOGLOCATION=\"${LOGLOCATION}

access.log\"
PASSVARS += -DCONFFILELOCATION=\"${CONFFILELOCATION}dansguardian.conf\"
#PASSVARS += -DPIDDIR=\"${PIDDIR}\"

#Some advanced

options:
WARNING = -Wall
OPTIMISE = -O2
#DEBUG += -DDGDEBUG
#STATIC = -static

I = $(INSTALLPREFIX)
CFLAGS = $(OPTIMISE) $(WARNING)
DGCFLAGS

= $(OPTIMISE) $(PASSVARS) -lz $(STATIC)

.cpp.o:
$(CPP) $(DEBUG) $(CFLAGS) -c $<

all: $(OBJ)
$(CPP) -o dansguardian $(DGCFLAGS)

$(DEBUG) $(OBJ) $(LIBS) dansguardian.cpp

install:
@test -d $I$(SYSVLOCATION) || install -d $I$(SYSVLOCATION)
@test -d

$I$(CONFFILELOCATION) || install -d $I$(CONFFILELOCATION)
@test -d $I$(CONFFILELOCATION)phraselists || install -d

$I$(CONFFILELOCATION)phraselists
@test -d $I$(CONFFILELOCATION)languages || install -d $I$(CONFFILELOCATION)languages


@test -d $I$(CGIBINLOCATION) || install -d $I$(CGIBINLOCATION)
@test -d $I$(MANUALFILES)man8/ || install -d $I$(MANUALFILES)man8/


@test -d $I$(LOGLOCATION) || install -d $I$(LOGLOCATION)
@test -d $I$(BINARYLOCATION) || install -d $I$(BINARYLOCATION)
cp

-f ./filtergroupslist $I$(CONFFILELOCATION)filtergroupslist
cp -f ./dansguardianf1.conf $I$(CONFFILELOCATION)dansguardianf1.conf


cp -f ./dansguardian $I$(BINARYLOCATION)dansguardian
cp -f ./dansguardian.conf $I$(CONFFILELOCATION)dansguardian.conf
cp

-f ./bannedphraselist $I$(CONFFILELOCATION)bannedphraselist
cp -f ./exceptionphraselist $I$(CONFFILELOCATION)exceptionphraselist


cp -f ./weightedphraselist $I$(CONFFILELOCATION)weightedphraselist
cp -f -R ./phraselists/* $I$(CONFFILELOCATION)phraselists/


cp -f -R ./languages/* $I$(CONFFILELOCATION)languages/
cp -f ./bannediplist $I$(CONFFILELOCATION)bannediplist
cp -f

./banneduserlist $I$(CONFFILELOCATION)banneduserlist
cp -f ./bannedextensionlist $I$(CONFFILELOCATION)bannedextensionlist
cp

-f ./bannedmimetypelist $I$(CONFFILELOCATION)bannedmimetypelist
cp -f ./bannedurllist $I$(CONFFILELOCATION)bannedurllist
cp

-f ./bannedregexpurllist $I$(CONFFILELOCATION)bannedregexpurllist
cp -f ./bannedsitelist $I$(CONFFILELOCATION)bannedsitelist


cp -f ./contentregexplist $I$(CONFFILELOCATION)contentregexplist
cp -f ./greysitelist $I$(CONFFILELOCATION)greysitelist
cp

-f ./greyurllist $I$(CONFFILELOCATION)greyurllist
cp -f ./exceptionsitelist $I$(CONFFILELOCATION)exceptionsitelist
cp

-f ./exceptionurllist $I$(CONFFILELOCATION)exceptionurllist
cp -f ./exceptionuserlist $I$(CONFFILELOCATION)exceptionuserlist


cp -f ./exceptioniplist $I$(CONFFILELOCATION)exceptioniplist
cp -f ./pics $I$(CONFFILELOCATION)pics
cp -f ./transparent1x1.gif

$I$(CONFFILELOCATION)transparent1x1.gif
cp -f ./logrotation $I$(CONFFILELOCATION)logrotation
cp -f ./dansguardian.sysv

$I$(SYSVLOCATION)dansguardian
cp -f ./dansguardian.pl $I$(CGIBINLOCATION)dansguardian.pl
cp -f ./dansguardian.exe

$I$(BINARYLOCATION)dansguardian.exe
chmod o+x $I$(CGIBINLOCATION)dansguardian.pl
cp -f ./dansguardian.8.gz $I$(MANUALFILES)man8/dansguardian.8.gz


chown -R $(PROXYUSER):$(PROXYGROUP) $I$(LOGLOCATION)
chmod -R u+wr $I$(LOGLOCATION)
chmod -R og-w $I$(LOGLOCATION)
chmod u+wrx

$I$(LOGLOCATION)
if [ -f $(CHKCONF) ]; then $(CHKCONFIG); fi
if [ -f $(DEB_RC) ]; then $(DEB_RC) dansguardian defaults

50; fi
if [ -d $(LOGROTATELOCATION) ]; then cp -f ./logrotate.dansguardian $I$(LOGROTATELOCATION)dansguardian; fi

uninstall:
if [

-f $(CHKCONF) ] ; then $(CHKCONFIGDEL); fi
rm -f $(BINARYLOCATION)dansguardian
rm -f $(SYSVLOCATION)dansguardian
rm

-f $(CGIBINLOCATION)dansguardian.pl
rm -f $(MANUALFILES)man8/dansguardian.8.gz
rm -fr $(CONFFILELOCATION)
rm -fr

$(LOGLOCATION)
if [ -f $(DEB_RC) ] ; then $(DEB_RC) dansguardian remove ; fi
if [ -f $(LOGROTATELOCATION)dansguardian ]; then rm

-f $(LOGROTATELOCATION)dansguardian; fi

clean:
rm -f $(OBJ) $(PROG)


distclean:
rm -f $(OBJ) $(PROG) $(CONFIGUREFILES)
 
cp -f ./dansguardian $I$(BINARYLOCATION)dansguardian

I believe that's the line he's talking about, since cygwin's gcc adds .exe to the end of it's output binaries the file will be dansguardian.exe instead of just dansguardian.
 
Back
Top