Koozali.org: home of the SME Server

Dansguardian + NCSA-auth + Windows

Offline bloodshoteye

  • *****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
Dansguardian + NCSA-auth + Windows
« on: December 11, 2007, 01:35:08 PM »
Hi, all

When I activate Dansguardian with ncsa-auth on an updated SME 7.2 I wait more than 5 mins for Windows XP to ask for a password and user-name. Occurs with Firefox or ie6.
The XP box is properly joined to the Samba domain, and logged in. I installed Dansguardian according to the wiki, admittedly not the very latest rpm - I used the one prior to Dec 7.

In contrast, a linux (Ubuntu) box running  Firefox prompts immediately for credentials.

The forum is silent on this - would anyone hazard a guess as to what I could look for? Please ask if you need more details.

Thanks,
SME Server is a fantastic product - thank you!

Offline Franco

  • *
  • 1,171
  • +0/-0
    • http://contribs.org
Re: Dansguardian + NCSA-auth + Windows
« Reply #1 on: December 11, 2007, 09:14:41 PM »
Is the client properly configured with the proxy settings? Dansguardian runs on a different port than Squid, so make sure you have the right port and not 3128 which is squid's default.

Offline bloodshoteye

  • *****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
Re: Dansguardian + NCSA-auth + Windows
« Reply #2 on: December 11, 2007, 10:38:14 PM »
'sfunny, can't insert quote code? - and I can't remember the syntax (blush)

Stuntshell, I tried "Auto detect proxy server" and as another test I inserted the server's IP address and port 8080.
Both scenarios make the client wait more than 5 mins.


SME Server is a fantastic product - thank you!

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Dansguardian + NCSA-auth + Windows
« Reply #3 on: December 11, 2007, 11:22:45 PM »
ardugh

Quote
'sfunny, can't insert quote code? - and I can't remember the syntax (blush)


Click on the quote link on top right of original post
or
use the second last button called Insert Quote
or
otherwise manually write the start & finish delimiters, as follows but without spaces (only written here to allow them to be displayed here).

[ quote ]  text [ /quote ]
...

Offline bloodshoteye

  • *****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
Re: Dansguardian + NCSA-auth + Windows
« Reply #4 on: December 12, 2007, 08:55:42 AM »
Quote
Click on the quote link on top right of original post
or
use the second last button called Insert Quote
Tried both the first time, thanks. Neither are working. Perhaps an issue with Firefox. I must try on another  PC - just had a thought. Must check to see if Dansguardian is preventing JScript code...
I've manually quoted the above - thanks for the syntax.

EDIT: Quoting issue was due to .js and .jse being blocked by Dansguardian - I had reverted to default install configs during a testing phase  :oops:

However, this does not solve my original issue - why do XP clients wait more than 5 mins before they can authenticate against Dansguardian + ncsa-auth  :?:
All installation & configuration done according to the Wiki.

« Last Edit: December 12, 2007, 09:02:49 AM by ardugh »
SME Server is a fantastic product - thank you!

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Dansguardian + NCSA-auth + Windows
« Reply #5 on: December 12, 2007, 09:46:22 AM »
ardugh

Quote
...why do XP clients wait more than 5 mins before they can authenticate

I can only make a guess, a firewall issue on your XP clients, more blocked file types, DNS issues with finding your server.
...

Offline bloodshoteye

  • *****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
Re: Dansguardian + NCSA-auth + Windows
« Reply #6 on: December 12, 2007, 10:16:27 AM »
Quote
I can only make a guess, a firewall issue on your XP clients, more blocked file types, DNS issues with finding your server.
Thanks for these pointers. I made sure:
1) Windows firewall is off
2) XP is on DHCP
3) User is logged into Samba domain via XP pc
4) WAN connection is up
5) User has credentials in /etc/proxyusers
6) Server reconfigured and rebooted

Of note: Client can access web-based mail (running on same box) with no auth other than usual log in to access mail.
 
EDIT: 11:30am
Also tried auth-pam. No auth dialog form appears at all on the XP pc. After a long time a "Cache Denied" message is given:
"Sorry, you are note allowed to access http://blah.tld until you have authenticated yourself"

I'm going to systematically turn off all extension blocking in "bannedextenlist" and report back.
« Last Edit: December 12, 2007, 10:31:19 AM by ardugh »
SME Server is a fantastic product - thank you!

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Dansguardian + NCSA-auth + Windows
« Reply #7 on: December 12, 2007, 10:24:08 AM »
ardugh

Is your sme server's IP specified as the workstations DNS server.
Is your sme server configured to be the DNS server for the network, rather than some external DNS server.
...

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Dansguardian + NCSA-auth + Windows
« Reply #8 on: December 12, 2007, 10:33:09 AM »

2) XP is on DHCP
3) User is logged into Samba domain via XP pc


in my experience when clients are in domain, fixed ip's and expecially fixed dns (sme's ip) entry are recommended.

HTH

Ciao

Stefano

Offline bloodshoteye

  • *****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
Re: Dansguardian + NCSA-auth + Windows
« Reply #9 on: December 12, 2007, 10:38:01 AM »
Quote
Is your sme server's IP specified as the workstations DNS server.
Yes
Quote
Is your sme server configured to be the DNS server for the network, rather than some external DNS server.
Yes, and set to resolve locally.

I also made sure there wasn't a strange/unwanted entry in the workstation's hosts file.
SME Server is a fantastic product - thank you!

Offline bloodshoteye

  • *****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
Re: Dansguardian + NCSA-auth + Windows
« Reply #10 on: December 12, 2007, 11:02:58 AM »
Quote
in my experience when clients are in domain, fixed ip's and expecially fixed dns (sme's ip) entry are recommended.
I did that via the Hostnames and addresses panel and assigned a static DHCP address.
Windows Ipconfig shows all necessary TCP details are in order.

EDIT
Strange - according to the Wiki, running
/usr/lib/squid/ncsa_auth /etc/proxyusers
should produce ERR or OK after entering a username & password
I get no response - just a flashing cursor and cannot therefor enter anything.
 
« Last Edit: December 12, 2007, 12:36:28 PM by ardugh »
SME Server is a fantastic product - thank you!

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Dansguardian + NCSA-auth + Windows
« Reply #11 on: December 13, 2007, 02:22:00 AM »
ardugh

I don't use ncsa auth, but I think the syntax is like this.

Enter your original passwords with inverted commas around them eg
htpasswd -b /etc/proxyusers username "password"

When you test the password file do
/usr/lib/squid/ncsa_auth /etc/proxyusers
you will then see no command cursor so just type in your username & password combination on the same line
username password
press Enter
then if correct you see
OK
or if incorrect you see
ERR Wrong password
When finished testing all passwords, to exit press
Ctrl c
...

Offline bloodshoteye

  • *****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
Re: Dansguardian + NCSA-auth + Windows
« Reply #12 on: December 13, 2007, 10:47:08 AM »
Quote
When you test the password file do
/usr/lib/squid/ncsa_auth /etc/proxyusers
you will then see no command cursor so just type in your username & password combination on the same line
username password
press Enter
then if correct you see
OK
or if incorrect you see
ERR Wrong password
Good (and thanks for the pointer, Ray) - works as advertised.
Stupidly, I was waiting to be asked a question instead of volunteering a username and password combo.

Has anyone experienced the 5 or more minutes delay I have for a login to ncsa_auth? This is very irritating, and maybe my error somewhere  :hammer:
So far the advice given has not solved this.

 
SME Server is a fantastic product - thank you!

Offline stephen noble

  • *
  • 607
  • +1/-0
    • Dungog
Re: Dansguardian + NCSA-auth + Windows
« Reply #13 on: December 14, 2007, 07:19:29 AM »
ncsa does login immediately if it is configured correctly

double check
http://wiki.contribs.org/Dansguardian#Using_Ident_login

Offline bloodshoteye

  • *****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
Re: Dansguardian + NCSA-auth + Windows
« Reply #14 on: December 14, 2007, 08:40:12 AM »
Quote
ncsa does login immediately if it is configured correctly

double check
http://wiki.contribs.org/Dansguardian#Using_Ident_login
Does this mean I need to use Ident login on the workstation in order for ncsa_auth to work?
« Last Edit: December 14, 2007, 08:53:09 AM by ardugh »
SME Server is a fantastic product - thank you!

Offline stephen noble

  • *
  • 607
  • +1/-0
    • Dungog
Re: Dansguardian + NCSA-auth + Windows
« Reply #15 on: December 14, 2007, 08:50:15 AM »
no, i just had a brain explosion
ignore that suggestion

try the server IP as the proxy

as you also have a problem with pam_auth, dans is just highlighting some other problem
« Last Edit: December 14, 2007, 08:54:00 AM by snoble »

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Dansguardian + NCSA-auth + Windows
« Reply #16 on: December 14, 2007, 08:53:34 AM »
ardugh

I spotted some typos in the Howto where it said nsca, but should have said ncsa.
Check that you used the correct command syntax for enabling ncsa auth.
The Howto has been revised.
...

Offline Franco

  • *
  • 1,171
  • +0/-0
    • http://contribs.org
Re: Dansguardian + NCSA-auth + Windows
« Reply #17 on: December 14, 2007, 02:20:06 PM »
Does this mean I need to use Ident login on the workstation in order for ncsa_auth to work?

No!

Offline bloodshoteye

  • *****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
Re: Dansguardian + NCSA-auth + Windows
« Reply #18 on: December 14, 2007, 05:44:41 PM »
Quote
I spotted some typos in the Howto where it said nsca, but should have said ncsa.
Check that you used the correct command syntax for enabling ncsa auth.
I noticed that on Wednesday, and apologise for not bringing it to snoble's attention.

Here's another typo:
Quote
You can test the authentication list using the following command

/usr/lib/squid/ncsa_auth /etc/proxyusers

Then enter the username & password when asked

You will see a ERR or OK response
You will not be asked - the cursor just winks at you. That fooled me until RayMitchell pointed out (higher up this thread) the user must enter a username password combo, then he will be given an ERR or OK.

Quote
try the server IP as the proxy
as you also have a problem with pam_auth, dans is just highlighting some other problem
I tried that and all the advice so far.
Then I applied for & installed dungog-dansguardian.

Sigh, I still have a problem - and I cannot re-install this server - so I've removed and re-installed all apllicable rpms 4 times... GPL version, then dungog version, then GPL version ad nauseum.

Latest woe, using dungog software: Dans with default + 2 filter groups & Squid enabled : browsers go straight out to wherever, although I have ncsa_auth with no transparent proxy, but with port blocking.
If I set http://proxy/proxy.pac or IP:port manually: "This page cannot be displayed"

I have added my box to the exceptioniplist. If set proxy manually or via http://proxy/proxy.pac, I get "The connection to the server was reset while the page was loading"

Can someone please help? - will provide further info if wanted.
 
Update:
I've just restarted dans with dansguardian -Q and browsers requested authentication, which was accepted. The process must be dying after a time - I swear it also worked briefly much earlier on.
Why would it start, then die?

Confirmed!! - less than 5 mins later a user no longer can refresh or move on. Killing the browser and restarting it brings up a "This page cannot be displayed"
Removing proxy detail from the browser and it goes anywhere you want.

Where could I look?
.

« Last Edit: December 14, 2007, 06:14:17 PM by ardugh »
SME Server is a fantastic product - thank you!

Offline stephen noble

  • *
  • 607
  • +1/-0
    • Dungog
Re: Dansguardian + NCSA-auth + Windows
« Reply #19 on: December 14, 2007, 11:49:17 PM »
Quote
In contrast, a linux (Ubuntu) box running  Firefox prompts immediately for credentials.

if this is so, this isn't a sme server problem

i'd unblock 80 and 3128 for now
try using pam_auth until you prove dans works on windows
install a vanilla windows

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Dansguardian + NCSA-auth + Windows
« Reply #20 on: December 15, 2007, 01:01:55 AM »
ardugh

Have you done this step ?

config setprop squid Transparent no
expand-template /etc/squid/squid.conf
sv t /service/squid
...

Offline bloodshoteye

  • *****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
Re: Dansguardian + NCSA-auth + Windows
« Reply #21 on: December 15, 2007, 07:16:29 PM »
Quote
Have you done this step ?

config setprop squid Transparent no
expand-template /etc/squid/squid.conf
sv t /service/squid
Yes
squid=service
    EnforceSafePorts=no
    RequireAuth=ncsa
    SafePorts=21,70,80,81,119,210,443,563,980,1024-65535
    TCPPort=3128
    TCPProxyPort=80:3128
    Transparent=no
    TransparentPort=8080
    access=private
    status=enabled

Quote
if this is so, this isn't a sme server problem
The issue has shifted somewhat - that may have been some config error on my part.
Now it seems (ref my rather lengthy post earlier - sorry for that) that dansguardian is dying after a few minutes - I cannot imagine why.
SME Server is a fantastic product - thank you!

Offline bloodshoteye

  • *****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
Re: Dansguardian + NCSA-auth + Windows
« Reply #22 on: December 16, 2007, 02:28:11 PM »
Quote
Now it seems (ref my rather lengthy post earlier - sorry for that) that dansguardian is dying after a few minutes - I cannot imagine why.
I think I answered my own question by applying the recommendation  in this thread:
http://forums.contribs.org/index.php?topic=39344.0
Dansguardian isn't dying at the moment  :)

« Last Edit: December 16, 2007, 02:29:58 PM by ardugh »
SME Server is a fantastic product - thank you!

Offline bloodshoteye

  • *****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
Re: Dansguardian + NCSA-auth + Windows
« Reply #23 on: December 16, 2007, 05:21:18 PM »
I give up, sad to say  :sad:
I've tried everything I can think of. It seems users can do what they want, never mind what I try to set.
Under the circumstances, I feel like dropping the box out of the window - spent an entire week on squid/dansguardian, day and night. :hammer:

Please tell - at the moment the box has both dungog-dansguardian installed and smeserver-dansguardian installed.
Do they conflict or does dungog need the sme rpm? - So far I can't find the answer to that. It may explain the erratic behavior of all the tests I've made.

SME Server is a fantastic product - thank you!

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Dansguardian + NCSA-auth + Windows
« Reply #24 on: December 16, 2007, 05:41:08 PM »
ardugh

Did you purchase (ie pay for), the dungog dansguardian product ?
...

Offline bloodshoteye

  • *****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
Re: Dansguardian + NCSA-auth + Windows
« Reply #25 on: December 16, 2007, 06:43:29 PM »
Quote
Did you purchase (ie pay for), the dungog dansguardian product ?
Hi RayMitchell - yes I did.
SME Server is a fantastic product - thank you!

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Dansguardian + NCSA-auth + Windows
« Reply #26 on: December 17, 2007, 05:48:30 AM »
ardugh

Then you should ONLY be installing the rpms from dungog, ie the commercial ones, and you should be getting support direct from dungog, not via these forums.

You should not be following the contribs.org wiki Howto as that is not applicable to you, but instead follow the information on the dungog website.
...

Offline bloodshoteye

  • *****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
Re: Dansguardian + NCSA-auth + Windows
« Reply #27 on: December 17, 2007, 09:44:45 AM »
Quote
Then you should ONLY be installing the rpms from dungog, ie the commercial ones, and you should be getting support direct from dungog, not via these forums.

You should not be following the contribs.org wiki Howto as that is not applicable to you, but instead follow the information on the dungog website.
I hear what you say, however the steps (as per their instructions) are:
1) install dansguardian
2) install smeserver-dansguardian
3) install dungog-dansguardian - to quote: "this just allows you to change the config files by the panel rather than by hand
it doesn't do anything else to dansguardian"

While admittedly not all Wiki steps need be followed, it appears some do, hence my (a relative newbie) confusion and this thread - particularly as you-all are extremely knowlegable.
I have requested assistance from them and hopefully I will be able to clear up my problem soonish.
I also receive replies from this list within my time zone's working hours as opposed to AU being 8 hrs ahead of me, which has been a major factor in asking for help. I hope I haven't stepped on anyone's toes.

Thanks,
« Last Edit: December 17, 2007, 11:59:36 AM by ardugh »
SME Server is a fantastic product - thank you!