Netgate SG-1000 microFirewall

Author Topic: How can I get remote logging to work with a syslog server?  (Read 1966 times)

0 Members and 1 Guest are viewing this topic.

Offline -flo-

  • Sr. Member
  • ****
  • Posts: 374
  • Karma: +29/-0
    • View Profile
How can I get remote logging to work with a syslog server?
« on: June 14, 2015, 06:32:37 am »
Hi,

I’m having problems with logging from pfSense to a syslog server. I use an old Mac mini (running OS X Leopard) as syslog server. This works partly: I only seem to get some of the log entries from pfSense into the Mac. There are some log messages from the sender „filterdns“ of level „Notice“ in the log files, also some entries of level „Error“ from syslog on pfSense itself („exiting on signal 15“). The source host of the entries is shown just fine. However other log entries from the pfSense system log or the firewall log do not appear to arrive on the Mac syslog.

The system log on the pfSense does not show any entries indicating a concrete problem. (The „exiting on signal 15“ message has been there occasionally before).

Is pfSense expected to be compatible with older syslog implementations at all? Getting a current syslog-ng onto this old Mac is probably a major hassle …

If this setup should work, what can be the problem here?

-flo-

Offline stephenw10

  • Administrator
  • Hero Member
  • *****
  • Posts: 11959
  • Karma: +469/-15
    • View Profile
Re: How can I get remote logging to work with a syslog server?
« Reply #1 on: June 14, 2015, 07:53:11 am »
I assume you have the log settings set to send all logs top the syslog server?

Run a packet capture on the on the interface the macmini is attached to, filter by it's address and port 514 (unless you're using a different port). You should see the syslog traffic there. If you open it in Wireshark you can read the messages being sent.

Steve

Offline -flo-

  • Sr. Member
  • ****
  • Posts: 374
  • Karma: +29/-0
    • View Profile
Re: How can I get remote logging to work with a syslog server?
« Reply #2 on: June 14, 2015, 02:03:10 pm »
I have indeed activated all topics. I checked the result of this in the pfSense /etc/syslog.conf file. Looks ok to me.

Packet Capture: I will try that.

Offline stephenw10

  • Administrator
  • Hero Member
  • *****
  • Posts: 11959
  • Karma: +469/-15
    • View Profile
Re: How can I get remote logging to work with a syslog server?
« Reply #3 on: June 14, 2015, 05:12:02 pm »
I'm not aware of any issue with using external logging. I have seen one instance where some log entries were truncated but they all still made it to the server.

Steve

Offline tim.mcmanus

  • Sr. Member
  • ****
  • Posts: 585
  • Karma: +25/-7
    • View Profile
Re: How can I get remote logging to work with a syslog server?
« Reply #4 on: June 14, 2015, 05:17:54 pm »
Are there any additional messages on the Console.app?
Intel Core i3-2100 Sandy Bridge dual core - Intel BOXDQ77MK LGA 1155 Intel Q77 - 4GB RAM - 320 GB 7200RM HD - 2 x Intel EXPI9301CTBLK 10/ 100/ 1000Mbps PCI-Express Network Adapter

Offline -flo-

  • Sr. Member
  • ****
  • Posts: 374
  • Karma: +29/-0
    • View Profile
Re: How can I get remote logging to work with a syslog server?
« Reply #5 on: June 20, 2015, 08:02:08 am »
Are there any additional messages on the Console.app?

Messages which the Mac receives are logged in system.log, however Console.app shows these plus some more received via syslog from the pfSense. Where these are logged and why they are not logged in the system log also I do not understand.

I checked a package dump and there seem to be log messages which do just not show on the Mac.

So this most probably is a Mac issue. I wanted to avoid to get a new device for logging to save money and time and used my old mini. But at least regarding the time this seems a bad investment for this purpose. I better get something else for that.

So slightly off topic question: Is there a recommendation for a cheap and simple syslog target? I thought of a Pi, does anyone use one of those for logging and if so which operating system?

-flo-

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 14782
  • Karma: +1373/-202
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: How can I get remote logging to work with a syslog server?
« Reply #6 on: June 20, 2015, 08:15:17 am »
Raspberry pi running just plain old https://www.raspbian.org/ with syslog-ng is more than capable of being a syslog server.

Can't you just run esxi on your mac mini, and then whatever linux/bsd/other distro you want to be your syslog?

Pretty sure esxi 6 works out of the box for mac mini, before you had to do a bit of tweaking and hacking to get it all working.. But with 6 pretty sure its OOTB ready..
« Last Edit: June 20, 2015, 08:18:52 am by johnpoz »
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Please don't PM me for personal help
- if you want to say thanks applaud or https://www.freebsdfoundation.org/donate/
1x SG-2440 2.4.2-RELEASE-p1 (work)
1x SG-4860 2.4.2-RELEASE-p1 (home)

Offline tim.mcmanus

  • Sr. Member
  • ****
  • Posts: 585
  • Karma: +25/-7
    • View Profile
Re: How can I get remote logging to work with a syslog server?
« Reply #7 on: June 20, 2015, 07:08:25 pm »
There is a paid version of ESXi for the Mac under the name VMware Fusion.  You can run one or multiple VMs on it while the MacOS is running.  I use it and it works like a charm.  I think it retails for $70, and it's on sale 25% off right now.
Intel Core i3-2100 Sandy Bridge dual core - Intel BOXDQ77MK LGA 1155 Intel Q77 - 4GB RAM - 320 GB 7200RM HD - 2 x Intel EXPI9301CTBLK 10/ 100/ 1000Mbps PCI-Express Network Adapter

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 14782
  • Karma: +1373/-202
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: How can I get remote logging to work with a syslog server?
« Reply #8 on: June 21, 2015, 10:01:43 am »
Well you can get esxi for FREE - so why would you run fusion?  Fusion is more the workstation version for mac, well not even that to be honest - its designed to run windows on your mac.  This is is mini that I take it he uses as server, so just put esxi on it for free and run whatever vms you want.

Fusion is great if you want to run that windows game on your mac, or you really like some windows app like note++ or something that only comes for windows and don't want to boot into windows like bootcamp and want to use that windows app like its a mac app. But if what your running is going to be on 24/7/365 as a server type server - like a syslog server.. Then that would be better suited as vm under esxi if you ask me. 

Fusion is not what he would want to run a linux distro to be a syslog server. 
« Last Edit: June 21, 2015, 10:05:49 am by johnpoz »
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Please don't PM me for personal help
- if you want to say thanks applaud or https://www.freebsdfoundation.org/donate/
1x SG-2440 2.4.2-RELEASE-p1 (work)
1x SG-4860 2.4.2-RELEASE-p1 (home)

Offline tim.mcmanus

  • Sr. Member
  • ****
  • Posts: 585
  • Karma: +25/-7
    • View Profile
Re: How can I get remote logging to work with a syslog server?
« Reply #9 on: June 21, 2015, 03:15:24 pm »
Works either way.  One way it's a dedicated ESXi host with the hypervisor is the primary OS.  The other way the Mac is the primary OS with a hypervisor running on top of it.  Both work just fine, but if you're primarily a Mac person, running Fusion is easier than installing and setting up ESXi.  Additionally, you need Windows to support ESXi because there is no Mac client (well, you can sort-of with Fusion, but it's not the same).

IMHO, both work reasonably well for this kind of application, and each has it's pros and cons from a support perspective.
Intel Core i3-2100 Sandy Bridge dual core - Intel BOXDQ77MK LGA 1155 Intel Q77 - 4GB RAM - 320 GB 7200RM HD - 2 x Intel EXPI9301CTBLK 10/ 100/ 1000Mbps PCI-Express Network Adapter

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 14782
  • Karma: +1373/-202
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: How can I get remote logging to work with a syslog server?
« Reply #10 on: June 21, 2015, 03:28:07 pm »
well if he is going to buy fusion, I would use it on his desktop..  And install esxi on his mini - fusion can be used to manage esxi host.
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Please don't PM me for personal help
- if you want to say thanks applaud or https://www.freebsdfoundation.org/donate/
1x SG-2440 2.4.2-RELEASE-p1 (work)
1x SG-4860 2.4.2-RELEASE-p1 (home)

Offline tim.mcmanus

  • Sr. Member
  • ****
  • Posts: 585
  • Karma: +25/-7
    • View Profile
Re: How can I get remote logging to work with a syslog server?
« Reply #11 on: June 21, 2015, 05:19:44 pm »
Could do that, but then he'd have to buy a Windows license.  :)
Intel Core i3-2100 Sandy Bridge dual core - Intel BOXDQ77MK LGA 1155 Intel Q77 - 4GB RAM - 320 GB 7200RM HD - 2 x Intel EXPI9301CTBLK 10/ 100/ 1000Mbps PCI-Express Network Adapter

Offline johnpoz

  • Hero Member
  • *****
  • Posts: 14782
  • Karma: +1373/-202
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Re: How can I get remote logging to work with a syslog server?
« Reply #12 on: June 22, 2015, 01:47:37 am »
Says who??  Fusion can manage esxi -- you don't need to run windows to run the vclient.

You can even create your vms in fusion, and then upload them to the esxi host.  Once they are on the esxi host you can edit their settings, start and stop them, etc.

https://derflounder.wordpress.com/2014/11/23/managing-esxi-hosted-virtual-machines-using-vmware-fusion-professional/
« Last Edit: June 22, 2015, 01:52:52 am by johnpoz »
- An intelligent man is sometimes forced to be drunk to spend time with his fools.
- Please don't PM me for personal help
- if you want to say thanks applaud or https://www.freebsdfoundation.org/donate/
1x SG-2440 2.4.2-RELEASE-p1 (work)
1x SG-4860 2.4.2-RELEASE-p1 (home)

Offline tim.mcmanus

  • Sr. Member
  • ****
  • Posts: 585
  • Karma: +25/-7
    • View Profile
Re: How can I get remote logging to work with a syslog server?
« Reply #13 on: June 22, 2015, 08:04:27 am »
Very, very different experience than the ESXi client for Windows.  You have to create the VM on the Mac first and then move it to ESXi.  The vast majority of features aren't available on the Mac client.

And the irony is that most EMC/VMware guys I know all use Macs but run Windows in Fusion to access their products.  I run a 100% Mac shop with the exception of my ESXi node and pfSense.  I personally prefer using the Windows VMware client, but, yes, you are correct, you get get by with using the Mac client.
Intel Core i3-2100 Sandy Bridge dual core - Intel BOXDQ77MK LGA 1155 Intel Q77 - 4GB RAM - 320 GB 7200RM HD - 2 x Intel EXPI9301CTBLK 10/ 100/ 1000Mbps PCI-Express Network Adapter

Offline doktornotor

  • Hero Member
  • *****
  • Posts: 8553
  • Karma: +956/-278
  • Not a pfSense employee, they cannot fire me...
    • View Profile
Do NOT PM for help!