Commit Graph

11 Commits

Author SHA1 Message Date
Michael Tremer
9c83954567 captivectrl: Remove unused code
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-10-05 12:06:45 +02:00
Michael Tremer
5511fa319a captive: Fix another typo in captivectrl
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 19:00:04 +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
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
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
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
Michael Tremer
0c24f0a9df captivectrl: Support unlimited leases
When the expiry time equals zero, the lease will have
no time constraints. The IP address will also be removed
as it might probably change.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:03 +01:00
Michael Tremer
5fbeaf1333 captivectrl: Allow empty IP addresses
Probably required for very long leases

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:03 +01:00
Michael Tremer
7ef66b6199 captivectrl: Change format of clients configuration
We store the start of the lease now and the time in
seconds after the lease expires

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:03 +01:00
Michael Tremer
ee40139d9a Captive Portal: add c-wrapper captivectrl
This wrapper reads the captive settings and clients and sets the
firewall access rules. It is called every time the config changed or
everytime that a client changes. Also this wrapper is later called once
hourly to flush the chains and rebuild rules for actual clients.

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