iptables logging

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
1000
Level 6
Level 6
Posts: 1039
Joined: Wed Jul 29, 2020 2:14 am

iptables logging

Post by 1000 »

I wanted to log every connection, ping, whatever (from input ) ( with iptables )
Is that enough and correct?

Code: Select all

iptables -I INPUT -p tcp -m limit --limit 1/hour --limit-burst 1 -j LOG --log-prefix "IPTABLES: mylog1 " -m comment --comment "IPTABLES: mylog1"
iptables -I INPUT -p udp -m limit --limit 1/hour --limit-burst 1 -j LOG --log-prefix "IPTABLES: mylog2 " -m comment --comment "IPTABLES: mylog2"
iptables -I INPUT -p icmp -m limit --limit 1/hour --limit-burst 1 -j LOG --log-prefix "IPTABLES: mylog3 " -m comment --comment "IPTABLES: mylog3"
iptables -I INPUT -f -m limit --limit 1/hour --limit-burst 1 -j LOG --log-prefix "IPTABLES: mylog4 " -m comment --comment "IPTABLES: mylog4"
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Locked

Return to “Networking”