]> _ Git - remote-logging.git/log
remote-logging.git
7 months agoserver,client: Implement ssl/tls encryption master
mivirl [Sun, 2 Jun 2024 17:55:26 +0000 (12:55 -0500)]
server,client: Implement ssl/tls encryption

The server and client now use ssl to communicate, with certificates
generated by `cert-server.pl`.

Clients connect to the cert-server to request a certificate using a
password. After receiving a certificate they can connect to the server
and start sending logs.

Rewrote the server in perl to facilitate use of encryption.

Removed use of actually portable perl due to the prebuilt binary not
including IO::Socket::SSL and Net::SSLeay. Rebuilding the perl binary
would be required to use encryption, so the system perl will be used
instead.

7 months agoclient: don't transfer rotated and/or empty log files
mivirl [Sun, 2 Jun 2024 03:02:20 +0000 (22:02 -0500)]
client: don't transfer rotated and/or empty log files

7 months agoclient: add more files to log by default; include more in info message
mivirl [Sun, 2 Jun 2024 02:56:57 +0000 (21:56 -0500)]
client: add more files to log by default; include more in info message

10 months agoserver: use printf for writing input to file (for logs, processes)
mivirl [Sun, 3 Mar 2024 23:57:24 +0000 (17:57 -0600)]
server: use printf for writing input to file (for logs, processes)

Switched to printf instead of echo to ensure that input lines are copied
as-is and escapes are ignored

10 months agoserver: Limit ports used to 46515-46550
mivirl [Sun, 3 Mar 2024 01:52:35 +0000 (19:52 -0600)]
server: Limit ports used to 46515-46550

10 months agoserver: Add retries with random backoff for file uploads
mivirl [Sun, 3 Mar 2024 01:06:49 +0000 (19:06 -0600)]
server: Add retries with random backoff for file uploads

When binding a port on the server side, there's a chance that another
process has already bound the port. Retries a few times with a random
backoff to reduce the number of collisions

Future versions will reduce the number of ports used by the server,
and this change makes it possible with fewer issues.

11 months agoserver: Remove .log and .cmdlog suffixes
mivirl [Wed, 7 Feb 2024 16:57:01 +0000 (10:57 -0600)]
server: Remove .log and .cmdlog suffixes

Removed suffixes from uploaded files since the prefixes already identify
the type of file, and many logs already have the .log suffix which
results in names like "L__service.log.log".

11 months agobuild: Check for downloaded dependencies before fetching
mivirl [Wed, 7 Feb 2024 16:43:34 +0000 (10:43 -0600)]
build: Check for downloaded dependencies before fetching

11 months agobuild: Replace static perl with actually portable perl
mivirl [Wed, 7 Feb 2024 16:42:02 +0000 (10:42 -0600)]
build: Replace static perl with actually portable perl

Actually portable perl can run on more systems than just Linux,
allowing for future clients that can run on windows/macos/bsd

11 months agoclient: Don't monitor non-text logs
mivirl [Wed, 7 Feb 2024 16:24:44 +0000 (10:24 -0600)]
client: Don't monitor non-text logs

When recursively adding logs from /var/log , logs that appear to be
binary files will not be continuously monitored, only uploaded once.
Otherwise files that aren't append-only may be corrupted

11 months agoclient: Remove packet capture
mivirl [Wed, 7 Feb 2024 16:23:57 +0000 (10:23 -0600)]
client: Remove packet capture

11 months agoclient: Add comments explaining behavior
mivirl [Wed, 7 Feb 2024 16:22:52 +0000 (10:22 -0600)]
client: Add comments explaining behavior

11 months agoclient: Use global variables for configuration
mivirl [Mon, 5 Feb 2024 15:41:51 +0000 (09:41 -0600)]
client: Use global variables for configuration

Use global variables for $name, $key so they don't need to be entered
on every line used for configuring files and commands to be monitored

11 months agoremove word
mivirl [Mon, 5 Feb 2024 13:11:24 +0000 (07:11 -0600)]
remove word

11 months agoAdd suffix to duplicate files; add comments
mivirl [Fri, 26 Jan 2024 15:26:10 +0000 (09:26 -0600)]
Add suffix to duplicate files; add comments

- Add more comments to server.sh
- Change server.sh shebang to busybox
- Add suffix to received files when duplicated

11 months agoAdd more default monitored files
mivirl [Fri, 26 Jan 2024 15:25:31 +0000 (09:25 -0600)]
Add more default monitored files

11 months agoRetry connection to server
mivirl [Fri, 26 Jan 2024 15:24:54 +0000 (09:24 -0600)]
Retry connection to server

11 months agoRename files for sorting; send processes separately
mivirl [Fri, 26 Jan 2024 15:23:35 +0000 (09:23 -0600)]
Rename files for sorting; send processes separately

- Rename files to start with underscore for sorting
- Send process list with name _processes.log

11 months agoAdd recursive file function
mivirl [Fri, 26 Jan 2024 01:16:14 +0000 (19:16 -0600)]
Add recursive file function

- Added function to get all files in directory recursively
- Add default monitoring to files in /var/log/
- Increase maximum number of concurrent connections to server

11 months agoAdd comments for simpler editing of monitored files
mivirl [Fri, 26 Jan 2024 01:15:54 +0000 (19:15 -0600)]
Add comments for simpler editing of monitored files

11 months agoUpdate README; add section on monitoring output
mivirl [Thu, 25 Jan 2024 19:16:41 +0000 (13:16 -0600)]
Update README; add section on monitoring output

11 months agoHandle SIGINT; Check read permissions
mivirl [Thu, 25 Jan 2024 18:44:22 +0000 (12:44 -0600)]
Handle SIGINT; Check read permissions

- Add signal handler for SIGINT that sends SIGINT to child processes
- Check for read permissions before attempting to send file

11 months agoUse client-specified hostname
mivirl [Thu, 25 Jan 2024 18:41:17 +0000 (12:41 -0600)]
Use client-specified hostname

Use client-specified hostname when the server gives a name to the
client. The name is stripped to only contain a-zA-Z and limited to
a length of 16 characters.

11 months agoSend filepaths to server
mivirl [Thu, 25 Jan 2024 05:19:35 +0000 (23:19 -0600)]
Send filepaths to server

Send a unicode character to replace the / when sending filepaths for logs and other files. Gives more descriptive filenames which can be displayed at the same directory level.

11 months agoAdd file existence checks; forking -> exit; fork for inotifywatch
mivirl [Thu, 25 Jan 2024 05:15:40 +0000 (23:15 -0600)]
Add file existence checks; forking -> exit; fork for inotifywatch

- Added checks for file existence before attempting to upload, which can in theory esult in race conditions, but in this case doesn't matter that much.
- Changed forking subroutines to exit instead of return, to prevent forked versions of the script from re-running the same commands
- Changed inotifywatch subroutine to fork

11 months agoChange system commands to run from current directory
mivirl [Thu, 25 Jan 2024 05:14:01 +0000 (23:14 -0600)]
Change system commands to run from current directory

11 months agoUpdate server port in client script; set argv[0] for exec'd commands
mivirl [Thu, 25 Jan 2024 05:09:44 +0000 (23:09 -0600)]
Update server port in client script; set argv[0] for exec'd commands

11 months agoUpdate README instructions
mivirl [Thu, 25 Jan 2024 05:08:44 +0000 (23:08 -0600)]
Update README instructions

11 months agoUpdate start-server script
mivirl [Thu, 25 Jan 2024 05:06:35 +0000 (23:06 -0600)]
Update start-server script

- Removed file server, since it's not currently used
- Fixed tcpsvd listen ip to accept connections from other machines
- Changed shebang to use busybox

11 months agoUse sh instead of bash
mivirl [Tue, 16 Jan 2024 23:02:05 +0000 (17:02 -0600)]
Use sh instead of bash

11 months agoUpdate license year
mivirl [Tue, 16 Jan 2024 22:59:26 +0000 (16:59 -0600)]
Update license year

11 months agoAdd lnav; fix build script
mivirl [Tue, 16 Jan 2024 22:57:12 +0000 (16:57 -0600)]
Add lnav; fix build script

Added lnav for viewing logs on the server side.
Fixed build script to place output files into _output/client and _output/server
directories for deploy

11 months agoAdd default monitoring locations
mivirl [Mon, 15 Jan 2024 22:49:51 +0000 (16:49 -0600)]
Add default monitoring locations

11 months agoAdd support for watching dirs, commands, packets
mivirl [Mon, 15 Jan 2024 22:48:20 +0000 (16:48 -0600)]
Add support for watching dirs, commands, packets

11 months agoChange output order, ensure server uses busybox sh
mivirl [Mon, 15 Jan 2024 22:47:31 +0000 (16:47 -0600)]
Change output order, ensure server uses busybox sh

11 months agoInstall/build inotifytools
mivirl [Mon, 15 Jan 2024 22:46:25 +0000 (16:46 -0600)]
Install/build inotifytools

11 months agoEnable inotifyd in busybox
mivirl [Mon, 15 Jan 2024 22:44:04 +0000 (16:44 -0600)]
Enable inotifyd in busybox

15 months agoUncomment wget
mivirl [Wed, 4 Oct 2023 02:41:18 +0000 (02:41 +0000)]
Uncomment wget

15 months agoAdd LICENSE
mivirl [Wed, 4 Oct 2023 01:24:14 +0000 (20:24 -0500)]
Add LICENSE

15 months agoAdd README
mivirl [Wed, 4 Oct 2023 01:15:51 +0000 (20:15 -0500)]
Add README

15 months agoCreate perl client; add static perl binary to build
mivirl [Sat, 23 Sep 2023 04:16:54 +0000 (23:16 -0500)]
Create perl client; add static perl binary to build

15 months agoAdd server command output; reduce wait time
mivirl [Sat, 23 Sep 2023 03:12:58 +0000 (22:12 -0500)]
Add server command output; reduce wait time

15 months agocleanup
mivirl [Thu, 21 Sep 2023 18:13:19 +0000 (13:13 -0500)]
cleanup

15 months agoInitial server version
mivirl [Wed, 20 Sep 2023 16:44:46 +0000 (11:44 -0500)]
Initial server version