thufir

Untitled

Jun 9th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1.  
  2. ### adapted from https://blog.webernetz.net/2014/07/24/basic-syslog-ng-installation/
  3.  
  4.  
  5. ##################################################
  6. options {
  7. create_dirs(yes);
  8. owner(USERNAME);
  9. group(USERGROUP);
  10. perm(0640);
  11. dir_owner(USERNAME);
  12. dir_group(USERGROUP);
  13. dir_perm(0750);
  14. };
  15.  
  16.  
  17. ##################################################
  18. source s_udp {
  19. network (
  20. ip-protocol(6)
  21. transport("udp")
  22. port(514)
  23. );
  24. network (
  25. transport("udp")
  26. port(514)
  27. );
  28. };
  29.  
  30.  
  31.  
  32.  
  33.  
  34. #Template for a new firewall in the firewalls.conf file
  35. #Entries to be changed: NAMEOFTHEFIREWALL and IPOFTHEFIREWALL
  36.  
  37. ##################################################
  38. filter f_NAMEOFTHEFIREWALL {
  39. host("IPOFTHEFIREWALL");
  40. };
  41. destination d_NAMEOFTHEFIREWALL {
  42. file("/var/log/firewalls/NAMEOFTHEFIREWALL/$YEAR/$MONTH/$YEAR-$MONTH-$DAY.NAMEOFTHEFIREWALL.log");
  43. };
  44. log {
  45. source(s_udp);
  46. filter(f_NAMEOFTHEFIREWALL);
  47. destination(d_NAMEOFTHEFIREWALL);
  48. };
  49.  
  50.  
  51.  
  52.  
  53. ##################################################
  54. destination d_host-specific {
  55. file("/var/log/firewalls/$HOST/$YEAR/$MONTH/$HOST-$YEAR-$MONTH-$DAY.log");
  56. };
  57. log {
  58. source(s_udp);
  59. destination(d_host-specific);
  60. };
Advertisement
Add Comment
Please, Sign In to add comment