LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-03-2004, 07:13 PM   #1
asterisk
LQ Newbie
 
Registered: Sep 2004
Posts: 2

Rep: Reputation: 0
Iptables logging


Hey all,

Here is my iptables config for a FC1 box. The third last line is there to log all connection attempts on closed ports, but it is also logging all entries for the subnet broadcast address. How do I make it only log attempts to connect to ports on the local IP address.



*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -j LOG
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
 
Old 09-03-2004, 11:16 PM   #2
hazza
Member
 
Registered: Nov 2003
Location: Australia
Distribution: Mandrake, SUSE, Fedora
Posts: 122

Rep: Reputation: 15
You could try ignoring all broadcast traffic by changing the third last line to:

-A RH-Firewall-1-INPUT -j LOG -m pkttype ! --pkt-type broadcast

This will ignore all incoming broadcast traffic though. There isn't enough information in your post to suggest another option.
 
Old 09-04-2004, 12:16 AM   #3
asterisk
LQ Newbie
 
Registered: Sep 2004
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks hazza,

Exactly what I was after!
 
  


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
IPTABLES - Logging metallica1973 Linux - Security 10 10-27-2005 05:17 PM
iptables logging laotalax Linux - Networking 1 10-25-2005 09:55 AM
Iptables and logging bennethos Linux - Security 1 10-18-2004 12:40 AM
Logging for IPTABLES logo Linux - Networking 4 10-11-2004 09:23 AM
iptables and logging Yohhan Linux - Networking 2 05-04-2004 11:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:49 PM.

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