Results 1 to 2 of 2
how i can log accepted and dropped packets?
for example i have this rule
iptables -A INPUT -p tcp --sport 80 -j ACCEPT
iptables -A INPUT -p tcp --sport 80 ...
- 06-24-2008 #1Just Joined!
- Join Date
- Apr 2008
- Posts
- 38
log accepted/drpped packets
how i can log accepted and dropped packets?
for example i have this rule
iptables -A INPUT -p tcp --sport 80 -j ACCEPT
iptables -A INPUT -p tcp --sport 80 -j REJECT
how i can log each rule?
please help me.
- 06-24-2008 #2
Simple, you need to log the packet before it is accepted or dropped like so:
Read the man pages or do a google search on iptables logging to get the full logging you require.Code:iptables -A INPUT -p tcp --sport 80 -j LOG iptables -A INPUT -p tcp --sport 80 -j ACCEPT iptables -A INPUT -p tcp --sport 80 -j LOG iptables -A INPUT -p tcp --sport 80 -j REJECT


Reply With Quote
