# when i restart syslog the syslog.conf return to default configuration



## enaftali (Mar 18, 2019)

Hi ,

I'm new to FreeBSD and I'm trying to make the server to send all the system logs to a remote server and I'm failing because every time I modify the  /etc/syslog.conf file  and once I restart syslog service `/etc/rc.d/syslogd restart` the /etc/syslog.conf file return to default configuration.
I'm using FreeBSD 11.2-RELEASE-p8 .


```
cat /etc/syslog.conf

local3.* %/var/log/sshd.log
local4.* %/var/log/rsyncd.log
local5.* %/var/log/smartd.log
ftp.* %/var/log/ftp.log
daemon.* %/var/log/daemon.log
*.notice;authpriv.none;kern.debug;lpr.info;mail.crit;mail.info;news.err;local0.none;local7.none %/var/log/system.log
security.* %/var/log/system.log
auth.info;authpriv.info %/var/log/system.log
*.emerg *
.     @192.168.2.1:514  ( this is the line i need to add)
```
I'll be very grateful if someone can help to solve this issue.


----------



## SirDice (Mar 18, 2019)

enaftali said:


> "/etc/rc.d/syslogd restart" the /etc/syslog.conf file return to default configuration.


This isn't something FreeBSD does. None of the startup scripts would ever do this.


----------



## enaftali (Mar 18, 2019)

Hi Sir Dice, do you have any idea how could this happen to me? every time i restart the syslog service this row  _._   @192.168.2.1:514 or any row i add to syslog.conf is disappearing.
am i doing  something wrong? is there another way i could send logs from my system, please tell me if you need further information, thanks.
i used this guide https://docs.freebsd.org/doc/7.4-RELEASE/usr/share/doc/handbook/network-syslogd.html for log client configuration.


----------



## SirDice (Mar 18, 2019)

Maybe there's something like Puppet or Ansible running that's managing configurations? Or some other way of pushing centralized configs?



enaftali said:


> is there another way i could send logs from my system, please tell me if you need further information, thanks.


Try putting it in /etc/syslog.d/remote.conf. 

And don't use old handbooks, certainly not from a version that's been EoL for 5 years. Lots of things have changed since 7.4.








						Chapter 13. Configuration and Tuning
					

This chapter explains much of the FreeBSD configuration process, including some of the parameters which can be set to tune a FreeBSD system.




					www.freebsd.org


----------

