News
:
This forum is now permanently frozen.
m0n0wall Forum
>
m0n0wall Support (English)
>
Services
>
Captive Portal
Topic: Voucher Length
Pages: [
1
]
Topic: Voucher Length (Read 8659 times)
Voucher Length
« on: December 08, 2010, 16:52:34 »
tukanuk
Posts: 2
I own a cafe and we've been using the voucher system for almost a year and it has worked great. I am wondering if anyone has any suggestions for shortening the length of the vouchers? In my setting security isn't our primary concern, the vouchers are intended to keep people from sitting at their computer all day without making a purchase.
Ideally, I'd like to shorten the vouchers to 6 characters.
Any suggestions?
Re: Voucher Length
« Reply #1 on: March 17, 2011, 22:47:28 »
xhanik
Posts: 14
Hi,
do you need still a solution?
Let me know....
BR
Re: Voucher Length
« Reply #2 on: March 17, 2011, 23:06:42 »
tukanuk
Posts: 2
Yes I do. If you have any suggestions that would be awesome.
Re: Voucher Length
« Reply #3 on: March 17, 2011, 23:31:52 »
xhanik
Posts: 14
Yes I have...
But first be informed that doing the change will cause your existing voucher-rolls to be not valid anymore....
You need to delete the old ones and create new once....
Be carefullllll - use it on you own risk....
-------------------------------------------------------------------------------------------------
1) Goto: http://<your-m0n0wall-ip>/exec.php
2) Enter
/usr/local/bin/voucher -g 40
as Command and hit execute.
You'll get something similar to this:
$ /usr/local/bin/voucher -g 40
-----BEGIN RSA PRIVATE KEY-----
asdfghjkhgfdsfghjhgfdsdfghjhgfdfghjhgfdsfgh
-----END RSA PRIVATE KEY-----
-----BEGIN PUBLIC KEY-----
asdfghjkhgfdsfghjhgfdsdfghjhgfdfghjhgfdsfgh+lAgMBAAE=
-----END PUBLIC KEY-----
3) Copy paste both keys into the voucher configuration screen (best to save them first into a document as the key changes everytime you generate them).
Different key sizes can be specified of course.
-------------------------------------------------------------------------------------------------
I got this from same post on this forum (Oktober 2007) and it worked for me very fine... I also removed the lower capital letters from the Captive Portal - Vouchers - Character set...
Now I have vouchers with lenght of 8....
BR
Re: Voucher Length
« Reply #4 on: September 16, 2013, 09:19:02 »
bigk
Posts: 3
Thank you for this. What is the command for 6 characters length vouchers?
Re: Voucher Length
« Reply #5 on: November 07, 2013, 13:38:30 »
xhanik
Posts: 14
Hi,
first sorry for late replay....
The key size is specified in source file (voucher.c) to be an value between 32 and 64...
So by using:
/usr/local/bin/voucher -g 32
you will get Voucher key of size 7 (sometimes there are also keys with length of 6 in Roll... don't know why...).
Because of source it's seems that 32 is min value and so Voucher key length is fixed to 7....
There is need to modify source file and compile it again to have Voucher key's with less digits....
If one finds an other solution/explanation please share....
BR
xhavik
Pages: [
1
]