-
[HOST]
Download VirtualBox and Vagrant and install them -
[HOST]
Create a VagrantfileVagrant.configure("2") do |config| config.vm.box = "ubuntu/trusty64" config.ssh.host = "127.0.0.1" config.ssh.username = "vagrant" config.ssh.password = "vagrant" config.vm.network :forwarded_port, id: 'ssh', guest: 22, host: 2222, auto_correct: false config.vm.network :forwarded_port, guest: 514, host: 1514, protocol: "tcp", auto_correct: false config.vm.network :forwarded_port, guest: 514, host: 1514, protocol: "udp", auto_correct: false end
-
[HOST]
Start the VMvagrant up
-
[HOST]
Connect to the VM with SSH on port 2222 -
[GUEST]
Switch to the root usersu
-
[GUEST]
Uncomment the following/etc/rsyslog.conf
lines:#$ModLoad imudp #$UDPServerRun 514
#$ModLoad imtcp #$InputTCPServerRun 514
-
[GUEST]
Add the following/etc/rsyslog.d/50-default.conf
line under theuser.*
one (prefixing a path with the minus sign omits flushing after every log event)local4.* /var/log/local4.log
-
[GUEST]
Restart Syslog serviceservice rsyslog restart
-
[HOST]
Restart the VMvagrant reload
-
[GUEST]
Make sure RSyslog is runningps -A | grep rsyslog
-
[GUEST]
Check RSyslog configurationrsyslogd -N1
-
[GUEST]
Check Linux system log for RSyslog errorscat /var/log/syslog | grep rsyslog
-
[GUEST]
Perform a local testlogger --server 127.0.0.1 --port 514 --priority local4.error "TCP local test" logger --server 127.0.0.1 --port 514 --priority local4.warning --udp "UDP local test" tail -3 /var/log/syslog tail -3 /var/log/local4.log
-
[GUEST]
Prepare for a remote testtail -f /var/log/syslog
OR
tcpdump port 514 -vv
-
[HOST]
Perform a remote testtelnet 127.0.0.1 1514
-
[HOST]
Perform a remote test with the NLog target (configuring it to use the Local4 facility)