|
1 | | -# ssl-syslog-server |
2 | | -Syslog server that needs to listen to SSL/TLS encrypted traffic |
| 1 | +# Simple C++ Syslog Server |
| 2 | + |
| 3 | +This is a simple syslog server implemented in C++ that listens for encrypted SSL/TLS traffic. It requires a PEM file |
| 4 | +containing both a certificate and a private key to establish a secure connection. |
| 5 | + |
| 6 | +## Prerequisites |
| 7 | + |
| 8 | +Before you run the syslog server, ensure that you have the following: |
| 9 | + |
| 10 | +- OpenSSL library installed on your system. Tested on Windows with FireDaemon OpenSSL 3. |
| 11 | +- C++ compiler with support for C++17 or later. |
| 12 | +- For Windows, Visual Studio Build Tools installed. |
| 13 | + |
| 14 | +## Installation |
| 15 | + |
| 16 | +1. **Clone the Repository** |
| 17 | + ```bash |
| 18 | + git clone https://github.com/kriegalex/ssl-syslog-server.git |
| 19 | + cd ssl-syslog-server |
| 20 | + ``` |
| 21 | +2. **Compile the Server** |
| 22 | + |
| 23 | + Windows |
| 24 | + ```bash |
| 25 | + cmake.exe -G "Visual Studio 17 2022" . -B ./cmake-build |
| 26 | + cmake.exe --build ./cmake-build --target SecureSyslogServer --config Release |
| 27 | + ``` |
| 28 | + Linux |
| 29 | + ```bash |
| 30 | + cmake . -B ./cmake-build |
| 31 | + cd cmake-build |
| 32 | + make -j 4 |
| 33 | + ``` |
| 34 | +3. **Prepare the PEM File** |
| 35 | + - You must have a file named server.pem in the same directory as the executable. This file should contain your SSL certificate followed by the private key. |
| 36 | + - If you do not have a server.pem, you can generate one using OpenSSL: |
| 37 | + ```bash |
| 38 | + openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out certificate.pem |
| 39 | + cat certificate.pem key.pem > server.pem |
| 40 | + rm certificate.pem key.pem |
| 41 | + ``` |
| 42 | +## Usage |
| 43 | +Run the server using the following command: |
| 44 | + ```bash |
| 45 | + ./syslog_server |
| 46 | + ``` |
| 47 | +The server will start and listen for incoming syslog messages over SSL/TLS on the specified port. |
| 48 | + |
| 49 | +## Configuration |
| 50 | +- Port Configuration: By default, the server listens on port 60119. If you wish to use a different port, you will need to modify the configuration file accordingly. |
| 51 | +- SSL/TLS Configuration: The server is configured to use TLS v1.2 by default. Modifications in the SSL setup should be performed in the source code if different SSL/TLS standards or configurations are needed. |
| 52 | + |
| 53 | +## Contributing |
| 54 | +Contributions are welcome! Please feel free to submit pull requests or open issues to improve the functionality or efficiency of the syslog server. |
| 55 | + |
| 56 | +## License |
| 57 | +This project is licensed under the MIT License - see the LICENSE file for details. |
0 commit comments