Commit Graph

11017 Commits

Author SHA1 Message Date
Michael Tremer
4b33d29de7 captive: Refactor the access page
This brings no functional changes, but cleans up the code
to re-use more and write less.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:55:27 +01:00
Michael Tremer
dbfd2622f5 captive: Get MAC address of a device without calling arp
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:55:27 +01:00
Michael Tremer
966971e589 captive: Don't compare action string
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Michael Tremer
48fb1d3b69 captive: Import new design
This is the new design of the access page of the captive
portal. It is based on the Bootstrap 4 grid system and
reboot but does not use anything else from it.

It is responsive and customisable.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Michael Tremer
050ce75678 bootstrap: New package
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Michael Tremer
a2c26388db captive-portal: Use template engine to render HTML template
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Michael Tremer
0a02d9bb0c captive-portal: Move CGI files to CGI directory
Previously the assets directory has ExecCGI privileges
which is not at all required and potentially dangerous.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Michael Tremer
d57e8c67bc captive-portal: Code cleanup
No functional changes

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Michael Tremer
11fc9575d7 captive: Fix bug with multiple license clients
If one active client with a license existed, any other client
authenticating will overwrite the configuration line.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Michael Tremer
abc41f02dd captive: Do not generally allow access to TCP/1013
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Michael Tremer
43834c4969 captive: Only make CGI script executable in document root
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Michael Tremer
4ddf453804 captive: Reindent apache configuration
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Michael Tremer
a79b220c5a captive: Log into default apache log files
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Alexander Marx
59a2d9c2d5 Captive-portal: Design changes
When choosing voucher as authentication type there is no need to display the license agreement textbox

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Alexander Marx
0806170370 BUG11141: Redesign of configuration website
To improve the user experience, the configuration part of generating new vouchers has been reworked.

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Alexander Marx
213335372d BUG11140: Captive logo dimensions
Now the min and max logo dimensions are shown in webinterface.

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Alexander Marx
6945954c44 BUG11137: Captive save action messes up the form
When configuring the captiveportal for the first time the form
will be empty after clicking on save button if not all relevant fields are set.

Now the settings are stored even if there is an error.

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Alexander Marx
1d77d1262a BUG11139: Captive voucher table too wide
Set table to 100% and the remark textfield to 96% (cellwidth)

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Michael Tremer
7ab3f84b2a Improve the wording of the Captive Portal configuration site
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Michael Tremer
2d92a4eca4 Update translations
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Michael Tremer
f339af2704 Rootfile update
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Alexander Marx
45129439bc Captive-Portal: fix fontsize of generated voucher
Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:45 +01:00
Alexander Marx
6820454e54 Captive-Portal: Fix folder permissions
Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:45 +01:00
Alexander Marx
52383f583e Captive-Portal: fix some typos and missing dir
Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:45 +01:00
Alexander Marx
b32d9e92be Captive-Portal: Add logo upload feature
Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:45 +01:00
Alexander Marx
83ba0896f6 Captive-portal: Add directory for logo upload
Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:45 +01:00
Michael Tremer
fb1d26d1bc captivectrl: Add protection against DNS tunnels
Limit the amount of DNS traffic for each client that
has not registered, yet.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Michael Tremer
76ece32362 captivectrl: Skip all lines that start with #
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Alexander Marx
07d56062a9 Captive-Portal: fix cleanup script
The cleanup-script did not write back the hash after the expired voucher
was delted

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:45 +01:00
Alexander Marx
5dc32e5877 Captive-Portal: add Errormessage when wrong code is entered
Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:45 +01:00
Alexander Marx
f3802750ac Captive-Portal: fix wrong expiretime of unused vouchers
Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:45 +01:00
Alexander Marx
facfdcd040 Captive-Portal: fix voucher form
Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:45 +01:00
Alexander Marx
6d31cfdd58 Captive-Portal: add logging to syslog
Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:44 +01:00
Alexander Marx
e14adf759a Captive-Portal: SHow always licencebox in config
Also fix index.cgi to show individual title

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:03 +01:00
Alexander Marx
c7e78cc62e Captive-Portal: several design changes
Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:03 +01:00
Alexander Marx
e01c5ab71a Captive-Portal: redesign Webinterface
Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:03 +01:00
Alexander Marx
47406df0fe Captive-Portal: fix some rootfiles
Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:03 +01:00
Alexander Marx
a6c985284d Captive-Portal: add backup-part
Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:03 +01:00
Alexander Marx
8ef627839f Captive-Portal: add captive logdir to apache2 rootfile
Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:03 +01:00
Alexander Marx
c04d2de74e Captive-Portal: add files to configroot rootfile
Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:03 +01:00
Alexander Marx
585703d8a3 Captive-Portal: Add files for webinterface tio rootfile
Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:03 +01:00
Alexander Marx
19cd2b6a7c Captive-Portal: add vhost config to apache2 rootfile
Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:03 +01:00
Alexander Marx
1fc9a43056 Captive-Portal: create dir for cative logfiles
Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:03 +01:00
Alexander Marx
5ca163cd82 Captive-Portal: add captive dirs and files to configroot
Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:03 +01:00
Alexander Marx
bbaa3613b4 Captive-Portal: add captive chains to firewall initscript
When loading the initscript of the firewall the neccessary chains for
the captive portalneed to be created.

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:03 +01:00
Alexander Marx
4d9002279f Captive-Portal: add crontab and cleanup scripts
The cleanup script is called every hour and deletes expired clients from
the clients file.
every night the captivectrl warpper runs once to flush the chains and
reload rules for active clients

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:03 +01:00
Alexander Marx
8b92078917 Captive-Portal: add web-part
Introduce new Captive-Portal.
Here we add the menu, apache configuration (vhost), IPFire configuration
website and Captive-Portal Access site. Also the languagefiles are
updated.

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:03 +01:00
Michael Tremer
cec16b8242 captivectrl: Move sure that the settings are always initialised
This just removes a compiler warning.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:03 +01:00
Michael Tremer
5906c96206 wirelessctrl: Disable MAC filter on blue if captive portal is enabled
Fixes #11038

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:03 +01:00
Michael Tremer
0d6a599aba captivectrl: Add missing space character
The iptables argument list was botched. Oops. Sorry.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:03 +01:00