The pfSense Store

Author Topic: NEW Package: freeRADIUS 2.x  (Read 104599 times)

0 Members and 1 Guest are viewing this topic.

Offline gettons

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #60 on: January 03, 2012, 05:16:38 pm »
Hi thanks for you quick reply :-)


I used the 1.4.0 I think, I did upgrade yesterday if I am not wrong. Today I found there was a new update so I have upgraded straightaway as I have never had any problems in the past to upgrade to the very next version.

I use only username and password, not any certificate at the moment, but it's something I will look into.

I am using my android mobile phone gingerbread v. 2.3.6 ( used to work yesterday ).

The config file is :


/usr/local/etc/raddb/users

"myuser" Cleartext-Password := "mypass", Simultaneous-Use := "3"



Offline Nachtfalke

  • Hero Member
  • *****
  • Posts: 2753
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #61 on: January 03, 2012, 05:33:44 pm »
Is this the only output in syslog according freeradius ?

Cann you stop freeradius service in GUI, SSH to your machine and start radiusd in debug mode.
Just type in:

Code: [Select]
radiusd -XThis is a capital X

Then the last lines of the output should be
"Ready to process requests"

Then try to connect with your client/phone and post the output of freeradius when the client tries to connect.

Offline gettons

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #62 on: January 03, 2012, 05:55:02 pm »
nope, that is the output of catting users.
But what I noticed something weird:

1)I can connect if I choose TLS instead of PEAP.
2)then if I disconnect and use PEAP again it does work ( guess it does not do any further check as if successfully logged in minutes ago

But If I reboot the pfsense box and try to connect using PEAP first it won't work.

This is from my laptop, which is a ubuntu oneiric 32bit using ralink chipset.


$ cat /var/log/radius.log
Tue Jan  3 23:50:19 2012 : Info: Loaded virtual server <default>
Tue Jan  3 23:50:19 2012 : Info: Loaded virtual server soh-server
Tue Jan  3 23:50:19 2012 : Info: Ready to process requests.
Tue Jan  3 23:50:20 2012 : Info: Signalled to terminate
Tue Jan  3 23:50:20 2012 : Info: Exiting normally.
Tue Jan  3 23:50:28 2012 : Info: Loaded virtual server <default>
Tue Jan  3 23:50:28 2012 : Info: Loaded virtual server soh-server
Tue Jan  3 23:50:28 2012 : Info: Ready to process requests.
Tue Jan  3 23:51:02 2012 : Auth: Invalid user: [gettons/<no User-Password attribute>] (from client wifi-ap port 0 via TLS tunnel)
Tue Jan  3 23:51:02 2012 : Auth: Login incorrect: [gettons/<via Auth-Type = EAP>] (from client wifi-ap port 0 cli E0-CA-94-36-3E-68)
Tue Jan  3 23:51:09 2012 : Auth: Invalid user: [gettons/<no User-Password attribute>] (from client wifi-ap port 0 via TLS tunnel)
Tue Jan  3 23:51:09 2012 : Auth: Login incorrect: [gettons/<via Auth-Type = EAP>] (from client wifi-ap port 0 cli E0-CA-94-36-3E-68)
Tue Jan  3 23:51:14 2012 : Auth: Invalid user: [gettons/<no User-Password attribute>] (from client wifi-ap port 0 via TLS tunnel)
Tue Jan  3 23:51:14 2012 : Auth: Login incorrect: [gettons/<via Auth-Type = EAP>] (from client wifi-ap port 0 cli E0-CA-94-36-3E-68)
Tue Jan  3 23:51:18 2012 : Auth: Invalid user: [gettons/<no User-Password attribute>] (from client wifi-ap port 0 via TLS tunnel)
Tue Jan  3 23:51:18 2012 : Auth: Login incorrect: [gettons/<via Auth-Type = EAP>] (from client wifi-ap port 0 cli E0-CA-94-36-3E-68)
Tue Jan  3 23:51:22 2012 : Auth: Invalid user: [gettons/<no User-Password attribute>] (from client wifi-ap port 0 via TLS tunnel)
Tue Jan  3 23:51:22 2012 : Auth: Login incorrect: [gettons/<via Auth-Type = EAP>] (from client wifi-ap port 0 cli E0-CA-94-36-3E-68)
Tue Jan  3 23:51:43 2012 : Auth: Login OK: [gettons/<via Auth-Type = mschap>] (from client wifi-ap port 0 via TLS tunnel)
Tue Jan  3 23:51:43 2012 : Auth: Login OK: [gettons/<via Auth-Type = EAP>] (from client wifi-ap port 0 cli E0-CA-94-36-3E-68)




Offline marcelloc

  • Hero Member
  • *****
  • Posts: 9961
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #63 on: January 03, 2012, 05:58:45 pm »
Nachtfalke,

I've just uploaded freeradius2 and openldap-sasl.

« Last Edit: January 03, 2012, 06:00:40 pm by marcelloc »

Offline Nachtfalke

  • Hero Member
  • *****
  • Posts: 2753
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #64 on: January 03, 2012, 06:23:02 pm »
@gettons
Not sure if this is an problem of freeradius or a configuration "problem" of your AP or freeradius-EAP setup.
The package offers the default settings which are in the eap.conf file. I am unsure what you have to change as I need to read the docs and wikis on freeradius first.

You could try with "copy reply to tunnel".

You further did not post the output of what "radiusd -X" is showing. radius.log and system.log do not offer all "errors".

@marcelloc,
I will test the i386 package as far as I get some time. It is late now in middle europe :P
You will get my feedback tomorrow morning.

Offline sandern

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #65 on: January 04, 2012, 04:53:37 am »

This should work by default as far as I know for now. The CISCO SG300-28 switch for example is sending the MAC address in username and password, all small letters without whitespace.
So you take a look on the user's guide and check the format the MAC address is sent.

If the PCs MAC address is for example:
00:11:AA:BC:DE:FF

Than the username and password in freeradius users should be:
0011aabcdeff


Please post back if you could try this and if it is working or not.
I am on vacation until 09 january 2012 and do not have the chance to test this all on a real switch and environment.
This is on my "todo" list - to check all features I added just from How-To's in real ;-)

I'm afraid I can't test this as our switches don't support 802.1x mac authentication, only port based. (With the Calling-Station-ID attribute) but by looking to the Mac-Auth info on the freeradius website it looks very easy to implement both a user auth and if that should fail, try the Calling-Station-ID for mac-auth.

In that way also switches that won't support 802.1x mac auth could be supported.

I'll test this out tomorrow if I can modify your config file a bit to make this work.

Offline Nachtfalke

  • Hero Member
  • *****
  • Posts: 2753
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #66 on: January 04, 2012, 05:03:19 am »
@sander
Yes, of course, you are welcome! :-)
freeRADIUS offers so much options and I really do not know all of them or used them. So it is really great if someone could help and test things :-)

@marcelloc
I tested the package you compiled on i386
It is working as well as the amd64 but a little bit better ;o)

freeradius-2.1.12.tbz is now installing the dependencies "postgresql" and "mysql-client" on its own.
I then copied the missing files from your "ldd" folder to /usr/local/lib/ and installed the "openldap-client" which automatically installed the "cyrus-sasl" dependency.

The tests I did above with amd64 (mysql, postgresql, ldap) had the same (positiv) result as on i386. :D


Ok, now I will try to find out how to use a wireless-AP with WPA/WPA2-Enterprise and PEAP and EAP-MSCHAPv2 on a Windows XP client and why it isn't working as expected by gettons.

Offline Nachtfalke

  • Hero Member
  • *****
  • Posts: 2753
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #67 on: January 04, 2012, 07:52:06 am »
Updates pkg v1.4.3

  • changed: service name and description (Services)
  • fixed: EAP-PEAP - there were problems when starting "soh" server. (eap)
  • Added: ability to change if MS Statement of Health should be enabled in EAP-PEAP or not. (eap)

@gettons
I tried with an Windows XP Client and an D-Link DIR-300 with DD-WRT firmware. Enabled WPA2 Enterprise on AP, added the AP-IP as NAS/Client on freeRADIUS server with same "shared secret".
Added a user "test" with password "test".

I had to import the "ca.der" from freeradius on the Windows XP Client and import it there and choose it in the network connections. This is how it is described here (german how-to) with many pictures:
http://www.administrator.de/index.php?content=142241

For my Windows XP Client the authentication is working with PEAP and MSCHAPv2.
The first time I connect I have to enter my user credentials (a windows window pops up where I enter username and password) - then I got connected. I got output in syslog if it works or not.

When I connect the second time then I do NOT need to enter username and password again.

Hope this will solve your problem. Feedback appreciated :-)

Offline Nachtfalke

  • Hero Member
  • *****
  • Posts: 2753
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #68 on: January 04, 2012, 08:15:37 am »
@gettons

I did some more tests and there are two possibilities.
If you disable "Check Server certificates" (see attachment) than you can connect just with the username. Then you do not need to import anything fromm freeradius server on the client.

The other possibility is that you ENABLE "Check Server Certificates" (see other attachment) and then you will be promted to accept the CA or not. If you accept then this cert will be added to your cert store. In Windows XP you can check this from here:

Start -> run -> certmgr.msc
There you find - I think it is the second from top (in german: "Stammzertifizierungsstelle"). There you should find the CA you accepted.

Offline gettons

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #69 on: January 04, 2012, 01:04:00 pm »
thank you very much Nachtfalke.
I will try these settings later as I am not home now.

But just to clarify: my problem was with ubuntu and android, I have not tested with win 7 yet. But I will surely do.



Thanks again, will get back to you asap

Offline Nachtfalke

  • Hero Member
  • *****
  • Posts: 2753
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #70 on: January 04, 2012, 02:17:21 pm »
thank you very much Nachtfalke.
I will try these settings later as I am not home now.

But just to clarify: my problem was with ubuntu and android, I have not tested with win 7 yet. But I will surely do.

Thanks again, will get back to you asap


Hi,

I think this was not OS dependent but I got some problems with the old pkg v1.4.2, too. I tried with Windows XP and WLAN because this is the only equipment I can use at the moment (I am on vacation).

Not sure why, but my patch was merged some hours ago but there is still the old pkg version available. So you will have enough time :D

Offline gettons

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #71 on: January 04, 2012, 02:20:39 pm »
@gettons
Not sure if this is an problem of freeradius or a configuration "problem" of your AP or freeradius-EAP setup.
The package offers the default settings which are in the eap.conf file. I am unsure what you have to change as I need to read the docs and wikis on freeradius first.

You could try with "copy reply to tunnel".

You further did not post the output of what "radiusd -X" is showing. radius.log and system.log do not offer all "errors".



@Nachfalke
This is the output of radiusd -X once I try to connect with my android mobile phone.
Again, it might be useful for you to know. With the previous version of your package it used to work fine. What I did was just to uninstall the package and install it again. I also rebooted in between just to be double sure.

The log is http://pastebin.com/XAsPjDSD It;s quite long and I didn't want to mess the thread

Offline Nachtfalke

  • Hero Member
  • *****
  • Posts: 2753
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #72 on: January 04, 2012, 04:52:52 pm »
@gettons
Not sure if this is an problem of freeradius or a configuration "problem" of your AP or freeradius-EAP setup.
The package offers the default settings which are in the eap.conf file. I am unsure what you have to change as I need to read the docs and wikis on freeradius first.

You could try with "copy reply to tunnel".

You further did not post the output of what "radiusd -X" is showing. radius.log and system.log do not offer all "errors".


@Nachfalke
This is the output of radiusd -X once I try to connect with my android mobile phone.
Again, it might be useful for you to know. With the previous version of your package it used to work fine. What I did was just to uninstall the package and install it again. I also rebooted in between just to be double sure.

The log is http://pastebin.com/XAsPjDSD It;s quite long and I didn't want to mess the thread


Hi,
the reason why I asked you between which version the error comes up was to find out what I changed and what could cause the problem.
I think I could reproduce your problem with my hardware and it is pointing to the "soh" server.

Lines ~470
Code: [Select]
[peap] server soh {
No such virtual server "soh"
Invalid user: [gettons/<no User-Password attribute>] (from client wifi-ap port 0 via TLS tunnel)
[peap] } # server soh
[peap] Got SoH reply
[peap] SoH was rejected
[peap] FAILURE

You could try the following until the pfsense server offers the new version:

- SSH to your pfsense
- Kill radiusd service
- edit /usr/local/etc/raddb/eap.conf
- scroll down where you find these two lines:
Code: [Select]
soh = yes
soh_virtual_server = "soh-server"

Delete these lines, save the file and restart freeradius FROM CONSOLE
Code: [Select]
/usr/local/sbin/etc/rc.d/radiusd onestart
Then it *should* work.

Offline gettons

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #73 on: January 04, 2012, 06:13:37 pm »
It does work like a charm now!
Thanks.

So, is this small modification something you will be including in the next freeradius package or not ? Or something which has to stay there for other purposes?



Offline Nachtfalke

  • Hero Member
  • *****
  • Posts: 2753
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #74 on: January 04, 2012, 06:18:41 pm »
It does work like a charm now!
Thanks.

So, is this small modification something you will be including in the next freeradius package or not ? Or something which has to stay there for other purposes?


As you could read in my last pkg Updates post here on the forum ;o)
I have included that. You now can choose if you want to enable or disable the SoH server and - thats the main part - I correctet the servername from "soh" which was wrong to "soh-server" which is correct.

So it shpuld work with and without but in future you will have the decision ;-)