[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to log iptables



itachi@cnt.uo.edu.cu wrote:
hey
how can i add a rule on my iptables to log the connections to my computer?



Hello,

# Log all incoming TCP packets
iptables -A INPUT -p tcp -j LOG --log-prefix "---[LOGGED (INPUT)]:--- "

# Log all incoming UDP packets
iptables -A INPUT -p udp -j LOG --log-prefix "---[LOGGED (INPUT)]:--- "

Note that these rules will log EVERY INCOMING PACKET and your syslog logs will get pretty big.

    - Dave


--

Dave Parker
Utica College Department of
Integrated Information Technology Services
Data Processing Office
(315) 792-3229
Registered Linux User #408177



Reply to: