DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am using Shorewall for my firewall. As it sits it is logging Accept packets fine to /var/log/messages. Does anyone have any info on how to log Deny/Reject packets to /var/log/messages as well?
Add a LOG rule the same as the DROP rule just before each DROP rule,eg
iptables -A FORWARD -i eth1 -p tcp --dport 22 -s ! 80.80.80.81 -j LOG --log-prefix "ssh_drop "
iptables -A FORWARD -i eth1 -p tcp --dport 22 -s ! 80.80.80.81 -j DROP
If you have a DROP policy, add a simple -j LOG rule as the last rule in those chains, eg
iptables -A INPUT -j LOG --log=prefix "policy_drop "
In Shorewall, make a duplicate of the DROP rule, change it to LOG and insert it before the DROP rule,
Thanks. I was thinking about doing that but figured there was a way to accomplish that the same as the Accept packets (I didn't have to add the log Accept, it did that automatically). I will give it a try tonight. Thanks again.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.