| | 14 | |
| | 15 | '''Virtual Machine (VM) Setup''' |
| | 16 | |
| | 17 | Download VM from the following Link. |
| | 18 | |
| | 19 | https://docs.learn.ac.lk/index.php/s/YcojJ2544b40Zw4 |
| | 20 | |
| | 21 | Import the VM to Virtualbox.[[BR]] |
| | 22 | |
| | 23 | Username and Password: docker[[BR]] |
| | 24 | |
| | 25 | May have to create Virtualbox Host-Only Network Adapter[[BR]] |
| | 26 | |
| | 27 | {{{ |
| | 28 | File > Host Network Manager > Create |
| | 29 | }}} |
| | 30 | |
| | 31 | Test internet connectivity.[[BR]] |
| | 32 | |
| | 33 | Login using PuTTY. |
| | 34 | |
| | 35 | |
| | 36 | |
| | 37 | '''Setup Network''' |
| | 38 | |
| | 39 | '''Rsyslog Server Setup''' |
| | 40 | |
| | 41 | Login to the VM as root user using PuTTY. |
| | 42 | |
| | 43 | Uncomment the following lines in /etc/rsyslog.conf. |
| | 44 | |
| | 45 | {{{ |
| | 46 | module(load="imudp") |
| | 47 | input(type="imudp" port="514") |
| | 48 | module(load="imtcp") |
| | 49 | input(type="imtcp" port="514") |
| | 50 | }}} |
| | 51 | |
| | 52 | |
| | 53 | Add the following lines to /etc/rsyslog.conf after the above last line. 192.168.56.0/24 is the rsyslog clients’ network. Replace it as needed. |
| | 54 | |
| | 55 | {{{ |
| | 56 | AllowedSender TCP, 127.0.0.1, 192.168.56.0/24 |
| | 57 | $template remote-incoming-logs,"/var/log/%HOSTNAME%/%PROGRAMNAME%.log" |
| | 58 | *.* ?remote-incoming-logs |
| | 59 | & ~ |
| | 60 | }}} |
| | 61 | |
| | 62 | Restart rsyslog service |
| | 63 | |
| | 64 | {{{ |
| | 65 | systemctl restart rsyslog |
| | 66 | }}} |
| | 67 | |
| | 68 | '''In Rsyslog Server Clients''' |
| | 69 | |
| | 70 | Append the following to /etc/rsyslog.conf. Replace 192.168.56.10 with the log server IP address. |
| | 71 | |
| | 72 | {{{ |
| | 73 | $PreserveFQDN on |
| | 74 | *.* @192.168.56.10:514 |
| | 75 | $ActionQueueFileName queue |
| | 76 | $ActionQueueMaxDiskSpace 1g |
| | 77 | $ActionQueueSaveOnShutdown on |
| | 78 | $ActionQueueType LinkedList |
| | 79 | $ActionResumeRetryCount -1 |
| | 80 | }}} |
| | 81 | |
| | 82 | Restart rsyslog service |
| | 83 | |
| | 84 | {{{ |
| | 85 | systemctl restart rsyslog |
| | 86 | }}} |