Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
-P INPUT ACCEPT
-A INPUT -m comment --comment "cali:Cz_u1IQiXIMmKD4c" -j cali-INPUT
-A INPUT -j KUBE-FIREWALL
-A INPUT -j ACCEPT
-A INPUT -i 127.0.0.1 -j ACCEPT
-A INPUT
-A INPUT -i lo -j ACCEPT


> sudo iptables -Ln 

...

collapsetrue

...


Modifying iptables to add logging


Save iptables to file

> sudo iptables-save > iptables.txt


Add to *filter target

-A INPUT -j LOG 


Restore iptables after modifying

> sudo iptables-restore iptables.txt


View logs: (on ubuntu)

> tail -f /var/log/kern.log 



References

ReferenceURL
Enable Logging in iptableshttps://tecadmin.net/enable-logging-in-iptables-on-linux/


...