Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 uid=1(daemon) gid=1(daemon) grupos=1(daemon) Safe-mode: OFF (not secure) /usr/share/doc/collectd-core/examples/iptables/ drwxr-xr-x | |
| Viewing file: Select action/file-type: #!/bin/bash #Simple script that sets up some chains in mangle table to do global logging of all #traffic going in and out of an interface #Could also use the regular input/output tree but this also catches the forwarded nat traffic IT="iptables -t mangle" #First clear the old stuff $IT -F incoming $IT -F outgoing $IT -N incoming $IT -N outgoing $IT -D PREROUTING -i eth0 -j incoming $IT -D POSTROUTING -o eth0 -j outgoing #should add some arg == stop exit here... $IT -A PREROUTING -i eth0 -j incoming $IT -A POSTROUTING -o eth0 -j outgoing $IT -A incoming -p tcp -m comment --comment "tcp" $IT -A incoming -p udp -m comment --comment "udp" $IT -A incoming -p icmp -m comment --comment "icmp" $IT -A outgoing -p tcp -m comment --comment "tcp" $IT -A outgoing -p udp -m comment --comment "udp" $IT -A outgoing -p icmp -m comment --comment "icmp" |
:: Command execute :: | |
--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.4999 ]-- |