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 04-01-2013, 12:32 PM   #1
smells_of_elderberries
LQ Newbie
 
Registered: Dec 2006
Posts: 25

Rep: Reputation: 0
Question Curating firewall log entries


Debian 6.0.7 Stable.

Is it possible to tell UFW (Uncomplicated/Ubuntu Firewall) not to log certain blocked connection attempts? If not, is there some other firewall management software that would allow such a thing?

I've identified several unnecessary connection attempts from software that I use that aren't harmful, but relate to an aspect of the software that I don't use. The log fills up pretty quickly whenever I use that software, so I'd rather these particular connection attempts simply weren't logged.

Thanks.
 
Old 04-01-2013, 04:43 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Personally I would ditch UFW. It's not a bad tool if you like the UFW syntax but personally I think iptables is not that difficult. If you post what traffic you want to allow from where (network addresses or ranges, protocols and ports) we'll show you a basic iptables rule set that does just that. Deal?
 
Old 04-01-2013, 06:12 PM   #3
smells_of_elderberries
LQ Newbie
 
Registered: Dec 2006
Posts: 25

Original Poster
Rep: Reputation: 0
Quote:
If you post what traffic you want to allow from where (network addresses or ranges, protocols and ports) we'll show you a basic iptables rule set that does just that. Deal?
It's a very kind offer. Thank you.

But I think you've misunderstood. I want to block certain connection attempts but not log them. Can iptables help me accomplish that? If so, I'll abandon UFW and take you up on your offer
 
Old 04-01-2013, 07:12 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by smells_of_elderberries View Post
It's a very kind offer. Thank you.
You're welcome but don't think too much of it: one way or the other "show and tell" is basically what we do here.


Quote:
Originally Posted by smells_of_elderberries View Post
But I think you've misunderstood. I want to block certain connection attempts but not log them. Can iptables help me accomplish that? If so, I'll abandon UFW and take you up on your offer
In its simplest form a logging rule means a jump ("-j") with a target of LOG. Likewise a blocking rule means a jump with a target of either REJECT or DROP. A "log and block" rule basically is a combination of those two rules: logging rule first, then the blocking one. It's not that I don't understand your question, and sure UFW can do what you want, I just find it easier to express it using basic iptables rules.
 
Old 04-01-2013, 08:39 PM   #5
smells_of_elderberries
LQ Newbie
 
Registered: Dec 2006
Posts: 25

Original Poster
Rep: Reputation: 0
Can a rule applied via iptables co-exist with rules managed by ufw? AFAIK ufw is just a front-end to iptables so I'm inclined to believe the answer is, "yes".

If so, I'll provide the information you need to so that you can create the rule that'll block without logging for the connections in question.
 
Old 04-02-2013, 08:24 AM   #6
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
Yes, iptables can co-exist with ufw. However, a strong caveat is required in that unless you know what you are doing with respect to how Linux starts up and analyzes configuration files you are likely to rapidly get yourself into quicksand. See the following: http://manpages.ubuntu.com/manpages/...an8/ufw.8.html, note:
Quote:
When running ufw enable or starting ufw via its initscript, ufw will flush its chains. (snip)ufw supports application integration by reading profiles located in /etc/ufw/applications.d.
In other words, when UFW is called, all the iptables chains will be flushed. Consequently, any direct iptables rules you add to the UFW via a form of initialization scrip will need to be called at an appropriate time.

Personally, I think this is an unnecessary complication and I concur with unSpawn in that your best option is to forget UFW or any other front end for iptables and simply write iptables rules directly, which are no more complicated than those of UFW.
 
Old 04-02-2013, 06:17 PM   #7
smells_of_elderberries
LQ Newbie
 
Registered: Dec 2006
Posts: 25

Original Poster
Rep: Reputation: 0
Quote:
which are no more complicated than those of UFW.
I disagree. I think ufw has a far simpler syntax and a faster learning curve.

Still, I agree that iptables should probably be manipulated directly instead of using a front-end. I'll undertake to start learning how to use iptables directly, and start a new thread if the same or new problems arise.

Thanks for the assistance.
 
Old 04-03-2013, 03:30 PM   #8
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
In case you need one, here is a pretty good introductory level tutorial on IPtables. There are better, more complete ones than this, but this is a good place to start.
 
  


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
Strange log entries in apache log under debian... hacking tentative ? strelok Linux - Security 4 11-11-2009 06:55 AM
a command or way to log time of iptables LOG entries? dividingbyzero Linux - Security 3 06-06-2008 01:23 AM
Can Samhain log my entries in /var/log/secure and /var/log/mesage to a central server abefroman Linux - Software 2 04-13-2008 04:13 PM
SU entries in log censanian Linux - Security 4 06-16-2007 08:40 PM
/var/log/auth.log entries buehler Linux - Security 1 04-23-2005 04:45 PM

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

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