Skip to content

Instantly share code, notes, and snippets.

@LouWii
LouWii / README-SERVER-SETUP.md
Last active February 8, 2022 02:37
Simple setup guide for any webserver running Linux
@LouWii
LouWii / cron-edit.sh
Created January 25, 2016 21:15
Backup a database using Cron
# Edit your crontab file using crontab -e command
#
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
@LouWii
LouWii / iptables-config-script
Last active June 20, 2024 10:08
Bash script to configure iptables for a web server. Some rules can be removed depending on used services.
#!/bin/sh
# Empty all rules
sudo iptables -t filter -F
sudo iptables -t filter -X
# Bloc everything by default
sudo iptables -t filter -P INPUT DROP
sudo iptables -t filter -P FORWARD DROP
sudo iptables -t filter -P OUTPUT DROP