This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This file is licensed under the DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 | |
# See http://www.wtfpl.net/txt/copying/ | |
password='' | |
mail='' | |
date=$(date +%m_%d_%Y%H_%M_%S) | |
if [ ! -d /backup/sql -o ! -w /backup/sql ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Port Knocking server configuration. It closes all ports but the webserver one. | |
# When the correct sequence of ports is detected (1000. 2000. 3000. 4000), the | |
# SSH port is opened for 5 seconds to allow connections. | |
# | |
# Erase all the rules | |
iptables -F |