pfSense Support Subscription

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

0 Members and 3 Guests are viewing this topic.

Offline webdawg

  • Jr. Member
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #270 on: February 18, 2012, 12:28:09 am »
Any guides on cert creation for eap-tls.

I checked:

Choose if you would like to create a client.p12 to export it to a windows client. You need this file if you use EAP-TLS.

Where do I get the cert it created?

I am using pfsense default cert manager.  Not the cert manager that freeradius uses.

Offline Nachtfalke

  • Hero Member
  • *****
  • Posts: 2753
  • Karma: +0/-0
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #271 on: February 18, 2012, 06:10:53 am »
Any guides on cert creation for eap-tls.

I checked:

Choose if you would like to create a client.p12 to export it to a windows client. You need this file if you use EAP-TLS.

Where do I get the cert it created?

I am using pfsense default cert manager.  Not the cert manager that freeradius uses.

Here all is explained:
http://doc.pfsense.org/index.php/FreeRADIUS_2.x_package#EAP-TLS

PS: In pfsense 2.1 there will be a possibility to download a .p12 file for System -> CertManager
Jimp added this some days ago. If you gitsync your system you will have this ability.

Offline webdawg

  • Jr. Member
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #272 on: February 18, 2012, 10:11:43 am »
How stable is the gitsync?

Another thing that I was concerned about...though unrelated....

pfsense digitally signs its packages right?

The git is signed too?

Thanks for all the help.

Web

Offline Nachtfalke

  • Hero Member
  • *****
  • Posts: 2753
  • Karma: +0/-0
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #273 on: February 18, 2012, 02:26:16 pm »
Updates pkg v1.6.5:

  • Replaced: old traffic counter which didn't work against two shell scripts (authentication + accounting) which now work on interim-updates and start/stop updates. (start/stop istn'working correct BECAUSE CP doesn't reset the octets between every update. Interim-Update does this)
  • Changed: units in GUI from bits, bytes and seconds to high and better readable values
  • Changed: placing all scripts (traffic counter + motp in central folder under /usr/local/etc/raddb/scripts/)
  • Changed: placing files and databases for time-/traffic-counter in /var/log/radacct/ This makes it possible to use them on embedded systems because of read-write access to this folders.
  • Updated pfsense docs

Known bugs:
  • When using "stop/start accounting on CP then "Amount of Time/Amount of Traffic" isn't working correctly.
    http://redmine.pfsense.org/issues/2164
  • When using CP + RADIUS + Vouchers and "reauthenticate every minute" is enabled then CP sends the voucher as username to RADIUS. This causes RADIUS to disconnect the "user/voucher" because of an unknown/wrong "username".
    http://redmine.pfsense.org/issues/2155
  • When stop/start accounting on CP is enabled than the syslog shows many "wrong order" or "Login found bot no logout detected". This seems to not affect the usage of RADIUS but it is not 100% correct.
    http://redmine.pfsense.org/issues/2143

============================================

Don't know how stable it is.
http://doc.pfsense.org/index.php/Updating_pfSense_code_between_snapshots

This command will show you :D
Code: [Select]
pfSsh.php playback gitsync RELENG_2_0
« Last Edit: February 18, 2012, 03:19:50 pm by Nachtfalke »

Offline pszafer

  • Jr. Member
  • **
  • Posts: 40
  • Karma: +0/-0
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #274 on: February 19, 2012, 07:08:43 am »
@Nachtfalke
I just would like to say that if you want copy content of my gdoc to freeradius/pfsense wiki, enjoy and do it ;)

Someday I wish do delete as much as possible from samba package and leave just winbindd, ntlm_auth and related necessary packages, just don't know when I'll have enough time to do it ;)

Offline Nachtfalke

  • Hero Member
  • *****
  • Posts: 2753
  • Karma: +0/-0
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #275 on: February 19, 2012, 08:11:36 am »
@Nachtfalke
I just would like to say that if you want copy content of my gdoc to freeradius/pfsense wiki, enjoy and do it ;)
Thank you for that! Some parts of your tutorial can be done from GUI. Others need additional configuration. I added the URL to the docs. :-)

Someday I wish do delete as much as possible from samba package and leave just winbindd, ntlm_auth and related necessary packages, just don't know when I'll have enough time to do it ;)
If you've done it successfully you let me know.  ;) Perhaps future versions of freeradius do have (better) support for that or I will add an option in GUI to add samba package as optional setting.

Offline webdawg

  • Jr. Member
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #276 on: February 19, 2012, 04:37:19 pm »
Thanks for this package.

I would like to disable the other types of EAP.  How should I go about doing this?  Right now I am using EAP-TLS and that is all I want to use.

What is the most secure WPA2 auth?  I am thinking either EAP-TLS or EAP-TTLS.  Am I right?

Like I said.  Thanks for the package.

Offline Nachtfalke

  • Hero Member
  • *****
  • Posts: 2753
  • Karma: +0/-0
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #277 on: February 19, 2012, 04:44:57 pm »
Thanks for this package.

I would like to disable the other types of EAP.  How should I go about doing this?  Right now I am using EAP-TLS and that is all I want to use.

What is the most secure WPA2 auth?  I am thinking either EAP-TLS or EAP-TTLS.  Am I right?

Like I said.  Thanks for the package.

If you disable "Weak EAP types" then you disable MD5, GTC and LEAP.
Then you there should only be three strong types available:
  • EAP-TLS which is very secure and the strongest encryption
  • EAP-TTLS
  • Protected EAP (PEAP)
EAP-TTLS and PEAP could be clasified as secure, too, but less than EAP-TLS.

Because all the three types are secure types and so I didn't implement any option in the GUI to disable them.
If you would like to disable this just go to
Code: [Select]
/usr/local/etc/raddb/eap.confand delete/comment the TTLS and PEAP blocks and restart freeradius.

Offline webdawg

  • Jr. Member
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #278 on: February 19, 2012, 07:25:10 pm »
Thanks.  I just wanted to know if that would work.

Offline Nachtfalke

  • Hero Member
  • *****
  • Posts: 2753
  • Karma: +0/-0
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #279 on: February 20, 2012, 01:26:48 am »
Thanks.  I just wanted to know if that would work.


It will unless you do not change anything in FreeRADIUS => EAP. A click on "Save" will overwrite the complete file.

Offline qbik

  • Jr. Member
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #280 on: February 20, 2012, 09:40:51 am »
What I meant for Vouchers packages is the following:
-Ability to create plans (by time or by traffic) and able to assign users to it and print those vouchers (easy part) also modify the GUI
-The problem comes when we create 2 weeks plans for example, and our DHCP lease is only a day, if the user is off for a day and someone else gets the ip he had before, he will be asked to authenticate again. Now if he has used 5 days of plan, would he now have 5 days left or since he has been authenticated he will have 2 weeks again. this is why I want to implement sqlippool to better mange the leases and prevent this from happening.

When I have a chance I will post screen shots of what I have and see where we can go from there. Also, I am trying to build an Asterisk package, could you point me on some doc you used?

Regards

Hi,
I am glad there is finally a good package for this. I had done this before by custom package building on FreeBSD with VMWare and then installing on PFsense, no GUI. I am using it on a hotel right now with 1000 rooms. I would like to contribute and share my work to contribute to a robust solution with MySQL integrated.
You are welcome!

There are a couple of things that I've came across and want to fix are the following:
-Implement Freeradius with sqlippool or better manage DHCP leases
I do not have much experience with *SQL databases. The basic support to connect to an *SQL database is ready and working. But you are right. I didn't take a look at sqlippool and of course if there will be GUI support for creating a custom SQL query would be really nice.
I thought of to hardcode the main part of a counter (daily, weekly,time, data) in the sqlcounter.conf and from GUI everybody can add the queries he likes.

-If user is authenticated for 1 day and server reboots, he has to authenticate again ( I want accounting to continue where it left off)
I don't think there is any way around - if freeradius or the NAS reboots the user has to reauthenticate. If the NAS sends "interim updates" or "start/stop" accounting updates then there will be no big accounting loss when server reboots/crashes. To get high availability you need to use more than one RADIUS server and more than one database (freeradius2 package can do failover/loadbalancing for LDAP or *SQL).
So I would be interested in what we can do on this point.

-Better Voucher/User GUI and printing options.
You have to explain that more in detail.

I'l be glad to share my work and help where I can.

Regards
As I said above - if you have any SQL ideas or something developed (sqlcounter, sqlippool, DOCUMENTATION :D ) then I really would appreciate to implement your work! :)
« Last Edit: February 20, 2012, 10:13:16 am by qbik »

Offline Nachtfalke

  • Hero Member
  • *****
  • Posts: 2753
  • Karma: +0/-0
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #281 on: February 20, 2012, 11:26:04 am »
What I meant for Vouchers packages is the following:
-Ability to create plans (by time or by traffic) and able to assign users to it and print those vouchers (easy part) also modify the GUI
-The problem comes when we create 2 weeks plans for example, and our DHCP lease is only a day, if the user is off for a day and someone else gets the ip he had before, he will be asked to authenticate again. Now if he has used 5 days of plan, would he now have 5 days left or since he has been authenticated he will have 2 weeks again. this is why I want to implement sqlippool to better mange the leases and prevent this from happening.

When I have a chance I will post screen shots of what I have and see where we can go from there. Also, I am trying to build an Asterisk package, could you point me on some doc you used?

Regards

I will wait for your screenshots to better understand what you mean. Further I took a look into sqlippool and the default config seems to work as far as I can see that. You only have to import the sql.table into your database and put in some content.

A better way would be to to make CaptivePortal able to understand "Framed-IP-Address" and "Framed-IP-Netmask" and "Framed-Route" attributes. This would allow us to always assign the sam IP address to a user when authentication on CP against freeradius. So no worry about any lease times on DHCP. As far as I know the PPTP implementation on pfsense can do this.

Abou your two plans - time or traffic:
  • Vouchers (time): A 10 day voucher will allow the user to use the internet for 10 days after first login. Fine!
  • Amount of Time (freeradius): An amount of 1440min (1 day) will allow the user to use this amount when he likes. 120min on the first day. 1000min on the nex day and 320min on the fifth day. This would work like a charm IF CP would reset the "Acct-Session-Time" attribute between every "start/stop" accounting update. ermal wrote a patch which *should* fix that hopefully in previous versions.
  • Amount of time (freeradius): This is working, too, with the new "Amount of time" counter I implemented (without any sql database). When running CP accounting updates in interim-update mode this is working like a charm. If running in "start/stop" accounting THEN CP needs to handle the "Acct-X-Octets" the correct way and reset them between every update. This probably will be fixed in future versions, too. If you want to run this against an *sql database we need to create the correct query. There is no need for a GUI because we can create 4 types (daily, weekly, monthly, forever) and put this into the sqlcounter.conf

Perhaps I misunderstand something but I hope your screenshots will clarify this if I was wrong :-)

Offline webdawg

  • Jr. Member
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #282 on: February 22, 2012, 04:30:36 pm »


It will unless you do not change anything in FreeRADIUS => EAP. A click on "Save" will overwrite the complete file.
[/quote]

Where does it pull the config from?  What php file would I have to edit?

Offline Nachtfalke

  • Hero Member
  • *****
  • Posts: 2753
  • Karma: +0/-0
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #283 on: February 23, 2012, 01:36:40 am »


It will unless you do not change anything in FreeRADIUS => EAP. A click on "Save" will overwrite the complete file.

Where does it pull the config from?  What php file would I have to edit?
[/quote]

File to edit:
Code: [Select]
/usr/local/pkg/freeradius.inc
Function to edit:
Code: [Select]
function freeradius_eapconf_resync()

Offline Fesoj

  • Full Member
  • ***
  • Posts: 207
  • Karma: +0/-0
    • View Profile
Re: NEW Package: freeRADIUS 2.x
« Reply #284 on: February 27, 2012, 04:47:59 am »
http://forum.pfsense.org/index.php/topic,46648.0.html

should have been posted here. mea culpa.