FreeNAS as Loghost

balanga

Patron
Joined
Jul 10, 2014
Messages
271
I want to use my FreeNAS box as a loghost, ie a central repository for holding syslog msgs from my LAN. Can I pkg install syslog-ng to enable such a facility?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
In a jail, absolutely.
 

balanga

Patron
Joined
Jul 10, 2014
Messages
271
Any chance of sharing the /usr/local/etc/syslog-ng.conf - I can't figure out what needs changing.... Is it this?
Code:
#
# uncomment this to enable logging to a remote loghost named loghost
# *.*<-><------><------><------><------><------><------>@loghost
#
#log { source(src); destination(loghost); };



Or is that the bit that is used by all the clients?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
I don't use my FreeNAS box as a syslog host, but I do use another FreeBAS box. Here's the config from that which will probably work (change the IP to be the one you want to listen on... the IP of tha jail usually, remove the 127.0.0.1 if you don't want to log anything from the jail itself)

Code:
@version:3.14
destination _DEFAULT { file("/var/syslog-ng/default.log"); };
log { source(_DEFAULT); destination(_DEFAULT); };
source _DEFAULT { internal(); syslog(transport(udp) port(5140) ip(192.168.1.1) ip(127.0.0.1)); };
 
Top