LinuxQuestions.org
Visit Jeremy's Blog.
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 06-14-2005, 07:14 PM   #1
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Rep: Reputation: 55
How can I set my firewall to log all dropped(rejected) packets?


How can I set my firewall to log all dropped(rejected) packets?

I use IP tables.
 
Old 06-14-2005, 07:44 PM   #2
darksmiley
Member
 
Registered: Jan 2004
Location: London, England
Distribution: Usually Linux Mint, Debian, Ubuntu or CentOS
Posts: 234

Rep: Reputation: 30
the way i set up my firewall was to module pretty much every single ip_tables related option in the kernel, and use firestarter as my UI to monitor packets. firestarter isnt the most powerful UI out there, but it will all get the job done and be very secure

if you need help with the kernel compilation just give me a shout!
 
Old 06-14-2005, 07:50 PM   #3
tangle
Senior Member
 
Registered: Apr 2002
Location: Arbovale, WV
Distribution: Slackware
Posts: 1,761

Rep: Reputation: 78
I am not an iptables expert, but if you place LOG --logprefix "Say what you want here" at the end of the chain. That should log any attemp that the chain picked up.
 
Old 06-14-2005, 07:54 PM   #4
mhallbiai
Member
 
Registered: Jun 2005
Posts: 96

Rep: Reputation: 16
depending on the amount of packets you are dropping/rejecting i dont know that logging all would be a good idea.

i have a chain that i create to do the logging before sending to DROP
Code:
iptables -N dropit
iptables -A dropit -m limit --limit 15/minute -j LOG --log-prefix Dropped:
iptables -A dropit -j DROP
then you would call 'dropit' where you would normally call DROP
Code:
iptables -A INPUT -s ip/cidr-to-drop -j dropit
so the 'ip-to-drop' will come in on INPUT, jump to 'dropit' (logged at a rate of 15 per minute) and then jump to DROP

you can change the rate to whatever fits your needs

hope this helps
 
Old 06-14-2005, 09:37 PM   #5
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
I use Firestarter, and have a program called LogWatch on FC3 (came with the distro), and LogCheck on Debian. Both send mail to root every day with lots of security related info including nicely summarized firewall hits. After studying them a few days, and beginning to understand the source of many of them, I am gradually telling Firestarter to quit logging some of the more common ones.
 
  


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
log dropped packets from queue exeon Linux - Networking 2 03-26-2005 09:36 AM
What process sent packets dropped by firewall? cherylchase Linux - Security 4 03-18-2005 09:36 AM
too much dropped packets...Hi.. alaios Linux - Networking 2 02-10-2005 04:49 AM
Dropped packets - is this a problem?? benr77 Linux - General 4 10-04-2004 02:05 PM
dropped packets... sohmc Linux - Software 3 05-29-2003 09:26 AM

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

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