LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-27-2008, 04:01 AM   #1
newtovanilla
Member
 
Registered: Apr 2008
Posts: 267

Rep: Reputation: 30
Question Firewall log file, how to make several different log files with IPTables?


I am a newbie to Linux, and have been trying to figure out how to set the log file names for the Firewall, and how I can have several different log files that log different things. After a google search, I found that the Linux Firewall uses IPTables, and I found that there is a log for IPTables.

How can I get several different log files with IPTables and set the log file names?
 
Old 11-27-2008, 10:58 AM   #2
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
So if I understand you correctly you want say a Log for Incoming, and Outgoing, or more like, Log for Information, Warnings, and Attacks.
 
Old 11-27-2008, 02:36 PM   #3
newtovanilla
Member
 
Registered: Apr 2008
Posts: 267

Original Poster
Rep: Reputation: 30
Yeah, a Firewall log. How to set the log file name and how to have several different log files to use for the Firewall?
 
Old 11-27-2008, 10:40 PM   #4
salter
Member
 
Registered: Oct 2008
Posts: 100

Rep: Reputation: 15
Have a read on the subject at http://www.cyberciti.biz/tips/force-...-log-file.html
It should answer the question

Last edited by Tinkster; 10-30-2010 at 04:06 PM.
 
Old 11-27-2008, 11:24 PM   #5
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by salter View Post
Have a read on the subject at http://www.cyberciti.biz/tips/force-...-log-file.html
It should answer the question
Great link but I think (could be completly wrong) but the OP wants to log certain events to two different logs. Like normal events to say a log called info.log and say intrusion messages to say a intrusion.log. But as I said I could be really off on what he is requesting.
 
Old 11-28-2008, 12:39 PM   #6
newtovanilla
Member
 
Registered: Apr 2008
Posts: 267

Original Poster
Rep: Reputation: 30
Quote:
It should answer the question
Yeah, that helps. Thanks for the link to it.


Quote:
Just to let you all know. Even though you are setting this to log to /var/log/iptables.log, it still logs into /var/log/messages.

I am working on a fix for this.
How does it know to log the Firewall stuff into "/var/log/iptables.log" and can I add a couple of different files such as "/var/log/iplog1.log" "/var/log/iplog2.log" and "/var/log/iplog3.log"? It does not explain how to do that! And, it does not explain what name I can use for the log? And it does not explain how to tell IPTables what log files I want it to use, so how does it know to use the new log files?

Also, I could not find out about the log levels option and how to use it. The man page says to look at "syslog.conf(8)" and I can not find anything about log levels. There is no: man 8 syslog.conf???

Is there a commnad line to get your Firewall log level?
 
  


Reply

Tags
firewall, iptables, log



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
any ideas to reduce log file size or make log file size managed? George2 Programming 2 08-13-2006 06:55 AM
Deleted /var/log/messages, can't log any files-iptables chingyenccy Linux - Newbie 7 02-27-2005 04:03 PM
Log files for Firewall 2.4 DaemonWrightis Linux - Networking 1 02-26-2004 06:22 AM
iptables, changing log file from /var/log/messages acid2000 Linux - Networking 3 03-11-2003 08:38 PM
Can log files be time stamped? (such as FTP login and transfer log files) bripage Linux - Networking 6 08-08-2002 10:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:44 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