Commit graph

37 commits

Author SHA1 Message Date
Sean DuBois
4a19482e20 Implement global/bans returns the contents of the Bans table from the persistent database introduced in 0.9.0 2014-07-16 05:20:33 +00:00
Sean DuBois
05ec165128 Implement endpoint for running WHOIS queries 2014-07-10 00:54:26 +00:00
Sean DuBois
c59cb07298 All fail2go communication now has error handling, JSON casting still has no error handling 2014-07-08 05:28:30 +00:00
Sean DuBois
36cfd63495 Implement single error handler, start moving functions that discarded errors over to it 2014-07-07 23:43:30 +00:00
Sean DuBois
f861fc22a8 Mention config flag in README.md 2014-07-07 20:37:33 +00:00
Sean DuBois
f3fe29f69b config.json path can now be specified with the --config flag 2014-07-07 20:30:11 +00:00
Sean DuBois
a49b9b67de Add support for the special fail2ban form <HOST> all <HOST> instances are now replaced with (?:::f{4,6}:)?(?P<host>\S+) 2014-07-06 13:31:25 +00:00
Sean DuBois
17c57fa7f1 Add endpoint to do basic regex testing against all the logfiles for a jail 2014-07-05 06:03:53 +00:00
Sean DuBois
598eea73e3 Revert "Updating file path location search for config.json"
This reverts commit c5a2d036d7.

This commit was reverted since it breaks 'go run *.go', I plan on
bringing back custom config.json location with a switch instead.
2014-07-04 13:22:48 +00:00
Sean DuBois
be624ce771 Garbage paren char, also remove comments above null checks 2014-07-04 01:50:39 +00:00
Phillip Moore
c5a2d036d7 Updating file path location search for config.json
Instead of looking for config.json form current directory when running the program, look for the config.json from the executable running directory.  This will allow for calling fail2rest executable from a service w/o getting the "failed to open config: config.json" error.
2014-07-03 21:25:40 +00:00
Phillip Moore
dec5d521b7 Also update for fail regexes
Update for fail regexes too (same issue as IPList)
2014-07-03 21:18:26 +00:00
Phillip Moore
13babc7958 Fix nill/null value of IPList
Initialize IPList to an empty array if the IPList is nil/null.
2014-07-03 21:18:26 +00:00
Sean DuBois
e981bb0d73 Fail2go now returns useful errors when a failregex is not correctly added 2014-06-30 00:08:18 +00:00
Sean DuBois
3b85ffd1fc Print return value when starting HTTP handler for better error display 2014-06-27 14:10:35 +00:00
Sean DuBois
6ac04f33cf fail2go pkg renamed Fail2goConn -> Conn so fully qualified name would just read fail2go.Conn 2014-06-27 06:58:35 +00:00
Sean DuBois
1f93c63ea1 Updating README.md with more information on how to run fail2rest 2014-06-26 03:26:58 +00:00
Sean DuBois
65a8a01f94 Add REST handlers for setting useDNS, maxRetry and findTime 2014-06-25 07:00:44 +00:00
Sean DuBois
2541520b69 Add findTime, useDNS, maxRetry to toplevel get for jail information 2014-06-25 05:23:33 +00:00
Sean DuBois
b46fd86c8a Add ErrorBody struct so all errors will have the same JSON format. If a failregex is malformed send a 400 error code with the fail message 2014-06-23 06:53:42 +00:00
Sean DuBois
66961603d6 Remove README entry about fail2rest, already has been started 2014-06-21 06:35:29 +00:00
Sean DuBois
25f4e02772 Implement the deletion/creation of failRegexes 2014-06-21 02:48:40 +00:00
Sean DuBois
5705bcd2ed fail2go now has multi-value returns instead of maps, update effected code 2014-06-20 13:58:57 +00:00
Sean DuBois
149fb451a6 Better URL scheme for manipulating bannedips, now just have single dir that you can POST or DELETE to 2014-06-20 06:30:18 +00:00
Sean DuBois
67aa38de0d Update config.json so fail2rest only bind to loopback 2014-06-18 06:30:02 +00:00
Sean DuBois
c9ba89e725 Fail2bansocket location is now a configuration option, refactor project since fail2go does method dispatch off of Fail2goConn struct 2014-06-18 05:53:54 +00:00
Sean DuBois
cf7967390d Add the ability to ban/unban IPs per jail 2014-06-17 06:02:54 +00:00
Sean DuBois
777a2df7a4 Don't need fail2rest anymore all handled in fail2go 2014-06-16 08:16:55 +00:00
Sean DuBois
ba4bcaf440 Add failRegex to jail info 2014-06-16 08:15:26 +00:00
Sean DuBois
405d61e729 Move fail2ban socket communication into its own project called fail2go 2014-06-16 03:38:10 +00:00
Sean DuBois
59f9d9b0a2 Start implementing jailControl 2014-06-15 07:14:13 +00:00
Sean DuBois
52d3885d74 Add README.md 2014-06-15 03:01:01 +00:00
Sean DuBois
de2a4e62f0 Rename global->basic for route, this more closely models the fail2ban-client documentation 2014-06-15 01:28:57 +00:00
Sean DuBois
3c3efd4449 Add basic Makefile with run+libs targets 2014-06-14 18:43:58 +00:00
Sean DuBois
865a7e49a4 Add config file, Addr is configured via config 2014-06-14 18:32:46 +00:00
Sean DuBois
de70086c1b Start modeling REST calls off of the fail2ban-client, add ping and status 2014-06-14 17:27:18 +00:00
Sean DuBois
28316de576 Implement #'fail2banRequest, allowing us to send a slice of commands to the fail2ban socket and using ogrek for serialize/deserialization to pickle 2014-06-13 04:06:27 +00:00