RecoilUK |
08-06-2005 11:40 AM |
Logging firewall with syslog-ng?
Hi guys
I have devloped a firewall configuration, but I,m unsure how to setup logging for it.
Here is the firewall conf...
Code:
#!/bin/sh
IPT=/sbin/iptables
# Set default policy of deny all traffic
$IPT -P INPUT DROP
$IPT -P OUTPUT DROP
$IPT -P FORWARD DROP
# Flush and delete all existing firewall rules
$IPT -F
$IPT -X
$IPT -Z
# Allow SSH traffic
$IPT -A INPUT -p tcp --dport 12222 -j ACCEPT
$IPT -A OUTPUT -p tcp --sport 12222 -j ACCEPT
# Allow DNS traffic
$IPT -A INPUT -p udp --sport 53 -j ACCEPT
$IPT -A OUTPUT -p udp --dport 53 -j ACCEPT
# Allow BF2 Sever traffic
$IPT -A INPUT -p udp --dport 16567 -j ACCEPT
$IPT -A OUTPUT -p udp --sport 16567 -j ACCEPT
$IPT -A INPUT -p udp --dport 16568 -j ACCEPT
$IPT -A OUTPUT -p udp --sport 16568 -j ACCEPT
$IPT -A INPUT -p udp --dport 16569 -j ACCEPT
$IPT -A OUTPUT -p udp --sport 16569 -j ACCEPT
How can I setup logging for this? basically I want to log everything the firewall rejects for the time being.
Thanks
|