Results 1 to 1 of 1
-
15th Jun 2014, 01:40 PM #1
Changing APF log for TDP/UDP drop's
If you’re tired of seeing your /var/log/messages log file full of dropped traffic from APF firewall then we have a solution! We’ll create a separate log file for TCP/UDP OUTPUT and drops which will leave your messages log nice and clean for easy browsing!
Requirements:
APF Firewall 0.9.3 or above. It may work on previous versions but we haven’t tested. If you’re using an older version you should upgrade anyways. Install APF by following our firewall tutorial.
Changing APF’s configuration:
1) Login to your server and su to root shell.
2) Create a new log file just for the TCP/UDP output/drops from APF.
Code:touch /var/log/iptables
Code:chmod 600 /var/log/iptables
First lets make a backup to be safe:
Code:cp /etc/syslog.conf /etc/syslog.conf.bak pico /etc/syslog.conf
Code:# Send iptables LOGDROPs to /var/log/iptables kern.=debug /var/log/iptables 5) Save the changes, ctrl + X then Y
Code:/sbin/service syslog reload
First lets make a backup to be safe:
Code:cp /etc/apf/firewall /etc/apf/firewall.bak pico /etc/apf/firewall
You should see this:
Code:if [ "$DROP_LOG" == "1" ]; then # Default TCP/UDP INPUT log chain $IPT -A INPUT -p tcp -m limit --limit $LRATE/minute -i $IF -j LOG --log-prefix "** IN_TCP DROP ** " $IPT -A INPUT -p udp -m limit --limit $LRATE/minute -i $IF -j LOG --log-prefix "** IN_UDP DROP ** "
Code:if [ "$DROP_LOG" == "1" ]; then # Default TCP/UDP INPUT log chain $IPT -A INPUT -p tcp -m limit --limit $LRATE/minute -i $IF -j LOG --log-level debug $IPT -A INPUT -p udp -m limit --limit $LRATE/minute -i $IF -j LOG --log-level debug
You should see this:
Code:if [ "$DROP_LOG" == "1" ] && [ "$EGF" == "1" ]; then # Default TCP/UDP OUTPUT log chain $IPT -A OUTPUT -p tcp -m limit --limit $LRATE/minute -o $IF -j LOG --log-prefix "** OUT_TCP DROP ** " $IPT -A OUTPUT -p udp -m limit --limit $LRATE/minute -o $IF -j LOG --log-prefix "** OUT_UDP DROP ** "
Code:if [ "$DROP_LOG" == "1" ] && [ "$EGF" == "1" ]; then # Default TCP/UDP OUTPUT log chain $IPT -A OUTPUT -p tcp -m limit --limit $LRATE/minute -o $IF -j LOG --log-level debug $IPT -A OUTPUT -p udp -m limit --limit $LRATE/minute -o $IF -j LOG --log-level debug
Code:Ctrl + X then Y
Code:/etc/apf/apf –r
Code:tail –f /var/log/iptables
Code:Aug 27 15:48:31 fox kernel: IN=eth0 OUT= MAC=00:0d:61:37:76:84:00:d0:02:06:08:00:08:00 SRC=192.168.1.1 DST=192.168.1.1 LEN=34 TOS=0x00 PREC=0x00 TTL=118 ID=57369 PROTO=UDP SPT=4593 DPT=28000 LEN=14
Code:tail –f /var/log/messages
Final notes:
APF is written by R-fx Networks: R-fx Networks || Linux Software & Blog
Article from: Changing APF log for TDP/UDP dropsAreon Reviewed by Areon on . Changing APF log for TDP/UDP drop's If you’re tired of seeing your /var/log/messages log file full of dropped traffic from APF firewall then we have a solution! We’ll create a separate log file for TCP/UDP OUTPUT and drops which will leave your messages log nice and clean for easy browsing! Requirements: APF Firewall 0.9.3 or above. It may work on previous versions but we haven’t tested. If you’re using an older version you should upgrade anyways. Install APF by following our firewall tutorial. Changing APF’s Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Change RapidLeech Legend for link saving format
By Juo in forum Server ManagementReplies: 0Last Post: 28th Oct 2010, 02:38 PM -
Can I change domain name for free ?
By Cojba in forum Technical Help Desk SupportReplies: 5Last Post: 26th Sep 2010, 09:42 PM -
Will You Change your Forum for the Holidays?
By Flash in forum Polling PlazaReplies: 18Last Post: 15th Dec 2009, 04:43 PM -
How to Change ip address for websites without proxy
By RapidshareResellers in forum Technical Help Desk SupportReplies: 5Last Post: 9th Oct 2009, 03:43 PM -
changing background color for coded links
By Alegria in forum phpBBReplies: 3Last Post: 9th Jul 2009, 04:19 PM
themaCreator - create posts from...
Version 3.24 released. Open older version (or...