Configs & Scripts

This section will list useful configuration files and shell scripts:

[Scripts]

1. Logrotate Syslog
-this perl script will basically archive and compress your syslog files in tar.gz format on specific directory. The script will also separate the archive files per month for easy lookups. The file can be viewed/downloaded on this link. This was tested successfully on HP-UX machines, but will work as well on Linux distributions with just minor modifications.

2. Simple Remove files older than XX
-this shell script will find files on a particular directory and remove older than the number of days specified. The file can be viewed/downloaded on this link

3. Sample iptables NAT script
– if you want to use your Linux server as your gateway for your LAN users to access the internet. Physical connection setup is typically Linux server with 2 network interface; first interface (eth0) connects to the LAN switch and second interface (eth1) to ISP router. The file can be viewed/downloaded on this link

4. Script to copy and send (tee) packets from a mirrored interface using iptables and ebtables based onĀ  previous topic discussed. The file can be viewed/downloaded on this link

5.Sample script to capture packets via tcpdump and send output file via FTP. The file can be viewed/downloaded on this link

Share

Leave a Reply