Menu

Help with Customized Voucher Profile

Help
2014-08-22
2014-08-26
  • Mohammad Javad Raadi

    Hello Dirk,
    thanks for the great project it's amazing and very powerful. i have been testing your project for a while now to see if it suits our requirements. I've managed to personalize voucher creation which now can generate customized username and password. then we wanted to have a specific range of static ip addresses for our devices and the rest of the ip pool range, for dynamic ip addresses. it works fine too. but i noticed that sometimes when a client is assigned a dynamic ip address and you want to change that to a static ip address from static ip range pool, it doesn't get redirected to the login page and the client can not ping the radiusdesk server. I noticed that restarting the chilli service can solve this problem.

    now my question is how can i create an hourly voucher plan which is valid from the login time until let's say the next 2 hours? i also want to specify how many days this voucher is valid. so to summarize i want the clients to have 2 hours straight internet access from the login time whether they log out or not and i want them to be able to use the same voucher the next day at any time they want.
    is this even possible to implement? can you guy please help me?
    thanks

     
  • Dirk van der Walt

    Hi Mohammad,

    I'm glad you find this project helpful :-)!

    To answer your question on the voucher, yes it can be done.

    There are two ways vouchers can deal with time.

    1.) The vouchers have a convenient function of activate and expire. This will activate when you log in the first time and then the clock starts ticking. So if you specify two hours here and they log in at 2PM their time is up by 4PM

    2.) There is another type of timer that you specify in the profile. This will also start counting if the person logs in at 2PM. If they however log out at 2:30PM they still have 90Minutes left which they can use at a later stage e.g. tomorrow. So tomorrow they can connect and spend another 30 minutes on the Internet and disconnect. Now they have used 60 minutes and still have 60 minutes remaining.

    With both these way you can also specify an optional Expiry date. E.g 31 August 2014 the voucher expires. So come 1 September, no more voucher!

    Is that what you are looking for?

    Kind regards

     
  • Mohammad Javad Raadi

    thanks for the quick reply Dirk. I really appreciate it.
    yes i've tried these kind of hourly vouchers. but i'm trying to create a voucher which is for example 2 hours straight. for example a user has a 2-hour voucher and he logs in at 2pm and use 30 minutes and logs out. i want him to just be able to use internet until 4 pm and after that he receives a message that your daily time is over. he used 30 minutes and still had 90 minutes left but because it's after 4 pm he can't log in again.
    is it clear? i don't want the clients to be able to use their remaining time later. they can only use it from the login time until the next 2 hours.
    thanks dirk

     
  • Dirk van der Walt

    Hi Mohammad,

    Ok, yes, that is the first scenario.

    So when you create a vouicher there is a sub-tab "Activate and Expire" There you need to select "Activate upon first login"

    The newer versions of RADIUSdesk has options to select days, hours and minutes.

    There you simply select two hours.

    Try it and let us know if it works :-)

     
  • Mohammad Javad Raadi

    i tried something and it kinda work. but i wanted to share this with you because i didn't think it's a very good solution.
    i noticed that when a voucher is created, for each day that you make it available a value like "4-00-00-00" is inserted to radcheck table. this value shows that the voucher is valid for 4 days. i tried changing this to 10 minutes(0-00-10-00) and created a voucher that was only 10 minutes. i also checked "Active upon first login" and "Passowrd never expire". i was able to log in with the voucher, use my time and after 10 minutes of the login i would get kicked out and wouldn't be able to login again. on the client side it would say that the time for the account is depleted.
    i can use this solution to address my needs but i want the users to be able to use the same username and password the next day and i don't think this solution would work.

     
  • Mohammad Javad Raadi

    thanks again Dirk
    how do i get the newer version?

     
  • Mohammad Javad Raadi

    thanks dirk i will try it and let you know.

     
  • Mohammad Javad Raadi

    Hi again,
    i've managed to upgrade it. great work by the way. i like what you've done with dynamic pages for mobile device and rd itself. i can see the options you mentioned. it think the way these options work is how i told you i tried. now if i want to give a voucher which is valid for 3 days and each day 2 hours straight, i have to create a profile which is 2 hours and total time is reset daily and then when i want to create the voucher i should check "Active upon first login" and then specify 2 hours and i should also specify expiration date which is 3 days ahean of creation date. am i right? but what if i want to have a bunch of printed vouchers prepared to give the clients? like 2-day, 3-day vouchers. i shouldn't have to specify expiration date because i don't know when i'm going to give out the vouchers. am i clear dirk?
    i also noticed that i can login from multiple devices with the standard 1 hour preconfigured profile. i only want two simultaneous sessions. how do i do that? i tried setting the simultaneous attribute to 2 but when i tested the radius it would say that maximus usage exceeded.
    thanks again for your great support

     
  • Mohammad Javad Raadi

    Hello again. I just thought of something and was wondering if it's possible. I think if i somehow managed to have an hourly profile that doesn't let the user log out, it would solve my problem. I mean the user tries to log out but the server doesn't close the session. I noticed when a user tries to login with a voucher and he checks "remember me" he can't log out because as soon as the login portal comes up again, it would login him automatically. Can i somehow make the users unable to log out?
    Thanks Dirk

     
  • Mohammad Javad Raadi

    Hello again, I've been testing the new version for a few hours now and i like the news features a lot. as i was looking around the dynamic login pages, i found "Redirect after connect" option in the settings tab. it's a great option because it can solve my problem. i wanted to have a way that wouldn't let the users log out themselves. when i set this option to for example "http://www.google.com", when a user logs in, the captive portal page is immediately redirected to google page. so the users have no longer access to log out option. that's exactly what i wanted. i noticed that if i put this url (http://10.1.0.1:3990/prelogin) i can get access to the captive portal page but it's ok because the users don't know how to get to this page. after this i tried creating a profile. you can see it in the attachment. everything works perfectly as long as "Rd-Reset-Type-Time" is set to "never". if i set this value to "daily" (which is what i need) the Session-Timeout value won't decrease every 60 seconds and when the time is finished, the client is kicked off but i can log in again!!!
    Am i setting something wrong?
    i used idle-timeout value so even if the user turns off wifi, the radiusdesk server doesn't close the session itself. i'm going to set this value as much as session-timeout value later.

     
  • Mohammad Javad Raadi

    Hello Dirk sorry to bother you this much but i still haven't figured out how to solve my problem. I've read all of the topics here and none of them is related to my problem. I would greatly appreciate it if anybody could help me.
    Thank you guys.

     
    • Mfawa Alfred Onen

      ​Mohammad, you could contact Dirk in a private email to discuss custom
      implementation of that feature for a fee. It is not easy to be the single
      committer/developer of the RD project and supporting the project that way
      could help boost the productivity and commitment to the software.

      Kind Regards!

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.