LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 09-25-2006, 01:53 AM   #1
unreal128
Member
 
Registered: Jun 2003
Distribution: SuSE, Slackware, Gentoo
Posts: 207

Rep: Reputation: 30
Hardening syslog-ng


I am running syslog-ng as my logging utility on Gentoo and was reading up on how the utility works; it provides a UDP port for remote logging. I am running the system on a laptop that is not part of any network or acting as a server.

My question is this, would it be okay just to disable this in /etc/services or do some local programs need this service up to perform logging correctly?

Also, as an aside, how would I write to the messages file via syslog-ng from the command line (eg. within a bash script.)
 
Old 09-25-2006, 02:21 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
by default syslog-ng normally only listens locally, on 127.0.0.1. you can check the syslog-ng.conf file yourself to see whichnetworks are being listened to.
 
Old 09-25-2006, 04:52 AM   #3
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Quote:
Also, as an aside, how would I write to the messages file via syslog-ng from the command line (eg. within a bash script.)
man logger

It is part of the 'util-linux' package so should already be installed on a Gentoo system.
 
Old 09-26-2006, 12:43 AM   #4
unreal128
Member
 
Registered: Jun 2003
Distribution: SuSE, Slackware, Gentoo
Posts: 207

Original Poster
Rep: Reputation: 30
Thanks Bulliver for the info on logging; this helps alot!

Acid Kewpie,
Thanks for the information regarding networking port access on the syslog-ng utility. I tried checking out syslog-ng.conf but couldn't find any information related to network configuration. (besides chain_hostnames.) I checked out syslog-ng's website and looking at the sample config code, it seems that Gentoo automatically loads the ebuild with network logging disabled.

Code:
options {
        chain_hostnames(off);
        sync(0);
        stats(43200);
};

source src { unix-stream("/dev/log"); internal(); pipe("/proc/kmsg"); };

destination messages { file("/var/log/messages"); };
destination console_all { file("/dev/tty12"); };

log { source(src); destination(messages); };
log { source(src); destination(console_all); };
 
Old 09-26-2006, 02:45 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
yes, in fact while i'm not using gentoo on my work systems, it's their really great documentation that got it set up. gentoo might be run by a bunch of backstabbing hippies, but they do write *very* good documentation.

Last edited by acid_kewpie; 09-26-2006 at 05:03 AM.
 
Old 09-26-2006, 03:47 AM   #6
JiYu
LQ Newbie
 
Registered: Sep 2006
Location: Germany
Distribution: FreeBSD
Posts: 29

Rep: Reputation: 15
Is there nothing like this?:

Code:
source s_external {
			tcp ( ip(0.0.0.0) port(514) keep-alive(yes));
};
 
Old 09-26-2006, 12:14 PM   #7
unreal128
Member
 
Registered: Jun 2003
Distribution: SuSE, Slackware, Gentoo
Posts: 207

Original Poster
Rep: Reputation: 30
Correct, there is no statement in the config file as mentioned above. What I pasted into my last reply is the entire configuration file.
 
Old 09-26-2006, 12:25 PM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
having something like syslog listening for external ip connections by default makes no sense whatsoever. it's just another security hole if that's the case, as 99.9%+ syslog instances in the world are only for the local host.
 
Old 09-26-2006, 05:26 PM   #9
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Quote:
gentoo might be run by a bunch of backstabbing hippies,
I see you follow gentoo-dev as well..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Centralized Syslog Server Using syslog-NG LXer Syndicated Linux News 0 04-28-2006 06:21 PM
Hardening Apache XaViaR Linux - Security 2 05-14-2005 06:25 PM
I need some ideas for hardening Bill Johns Linux - Security 2 05-01-2005 03:11 PM
Hardening RH 9 velan Red Hat 4 06-16-2004 07:40 AM
hardening my security Jalalabee Linux - Security 4 01-06-2004 02:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 08:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration