Re: how to log iptables
how can i add a rule on my iptables to log the connections to my computer?
# 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.
Utica College Department of
Integrated Information Technology Services
Data Processing Office
Registered Linux User #408177