OPNsense Forum

Archive => 22.7 Legacy Series => Topic started by: callaman on December 23, 2022, 02:03:42 pm

Title: SYSLOG via Specific Interface
Post by: callaman on December 23, 2022, 02:03:42 pm
Hi all.
Wanted to setup syslog out of one interface to talk to a management network but all syslog traffic appears to want to route out of the WAN.
There are lots of guides that offer info on how to configure the logging target etc in the user interface but nothing about telling it to go via a nominated interface to reach the target.
Any ideas?


Thanks
Title: Re: SYSLOG via Specific Interface
Post by: bartjsmit on December 23, 2022, 09:49:42 pm
Have you set a static route? System: Routes: Configuration
Title: Re: SYSLOG via Specific Interface
Post by: callaman on January 03, 2023, 01:06:03 pm
Hi and, apologies for a delayed response.
Yes, there is a static route. (It did occur to me to mention this while writing up the descritpion of the issue).
Title: Re: SYSLOG via Specific Interface
Post by: Patrick M. Hausen on January 03, 2023, 01:15:21 pm
Please post the output of
Code: [Select]
netstat -rn and tell us the IP address of your syslog server.
Title: Re: SYSLOG via Specific Interface
Post by: callaman on January 04, 2023, 12:42:17 pm
Hi there.

Omitted external IP addresses, for obvious reasons.


172.16.8.0/24      link#2             U          vmx1    <<<< SYSLOG SERVER RESIDES IN THIS NETWORK
172.16.8.16        link#2             UHS         lo0
172.16.12.0/24     link#3             U          vmx2
172.16.12.16       link#3             UHS         lo0
172.16.15.0/24     link#12            U          vmx6
172.16.15.16       link#12            UHS         lo0
172.16.18.0/24     link#4             U          vmx3
172.16.18.16       link#4             UHS         lo0
172.16.21.0/24     link#11            U          vmx5
172.16.21.16       link#11            UHS         lo0
172.16.24.0/24     link#13            U          vmx7
172.16.24.16       link#13            UHS         lo0
172.16.98.0/24     link#10            U          vmx4
172.16.98.16       link#10            UHS         lo0
Title: Re: SYSLOG via Specific Interface
Post by: Patrick M. Hausen on January 04, 2023, 12:57:24 pm
And you do not have an explicit gateway set for this directly connected network? Nor do you have any firewall rule with an explicit gateway setting?

If you just let the routing table do it's magic, you should be able to ping the syslog server, and of course also log, with all packets leaving through the vmx1 interface. There must be some explicit configuration changing that.