Changes between Version 2 and Version 3 of Csle2022/Agenda/rSyslog


Ignore:
Timestamp:
Oct 27, 2022, 4:35:28 PM (2 years ago)
Author:
dushmantha
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Csle2022/Agenda/rSyslog

    v2 v3  
    1212
    1313A wired internet connection is preferred.
     14
     15'''Virtual Machine (VM) Setup'''
     16
     17Download VM from the following Link.
     18
     19​https://docs.learn.ac.lk/index.php/s/YcojJ2544b40Zw4
     20
     21Import the VM to Virtualbox.[[BR]]
     22
     23Username and Password: docker[[BR]]
     24
     25May have to create Virtualbox Host-Only Network Adapter[[BR]]
     26
     27{{{
     28File > Host Network Manager > Create
     29}}}
     30
     31Test internet connectivity.[[BR]]
     32
     33Login using PuTTY.
     34
     35
     36
     37'''Setup Network'''
     38
     39'''Rsyslog Server Setup'''
     40
     41Login to the VM as root user using PuTTY.
     42
     43Uncomment the following lines in /etc/rsyslog.conf.
     44
     45{{{
     46module(load="imudp")
     47input(type="imudp" port="514")
     48module(load="imtcp")
     49input(type="imtcp" port="514")
     50}}}
     51
     52
     53Add 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{{{
     56AllowedSender 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
     62Restart rsyslog service
     63
     64{{{
     65systemctl restart rsyslog
     66}}}
     67
     68'''In Rsyslog Server Clients'''
     69
     70Append 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
     82Restart rsyslog service
     83
     84{{{
     85systemctl restart rsyslog
     86}}}