Este commit está contenido en:
Your Name
2020-05-27 17:41:14 +00:00
commit bff2789ec0
Se han modificado 17 ficheros con 302 adiciones y 0 borrados

13
.gitignore vendido Archivo normal
Ver fichero

@@ -0,0 +1,13 @@
node_modules
mysql
db
data
mongodb
redis
mariadb
db_data
backups
secure
production/registry/registry
production/kamailio/kamailio/kamailio.sqlite
bind9/bind

9
scripts/backup-cloud.sh Archivo normal
Ver fichero

@@ -0,0 +1,9 @@
#!/bin/bash
tar --exclude=./opt/docker/doom/games/web \
--exclude=./registry/registry \
--exclude=./backups \
--exclude=./mastodon/mastodon/media_attachments \
--exclude=./pleroma/pleroma/uploads \
--exclude=./gnusocial/gnusocial/files \
--exclude=*.old \
-Jpcf - /opt/docker | ssh -p22222 orangepi@orangepi.manalejandro.com "cat > /mnt/docker-compose-cloud-$(date +%d%m%Y).tar.xz"

27
scripts/backup-dbs.sh Archivo ejecutable
Ver fichero

@@ -0,0 +1,27 @@
#!/bin/bash
tar -Jcpf backups/backup-dbs-$(date +%d%m%Y).tar.xz \
/opt/docker/kanban/data \
/opt/docker/gitea/data \
/opt/docker/gitea/db \
/opt/docker/pleroma/data \
/opt/docker/crossposter/redis \
/opt/docker/crossposter/data \
/opt/docker/mumble/data \
#/opt/docker/mastodon/redis \
#/opt/docker/mastodon/data \
#/opt/docker/mastodon/elastic/nodes \
/opt/docker/peertube/redis \
/opt/docker/peertube/data \
/opt/docker/familyark/mongodb \
/opt/docker/etherpad/mysql \
/opt/docker/gnusocial/mariadb \
/opt/docker/wordpress/mysql \
/opt/docker/haraka-wildduck/mongodb \
/opt/docker/haraka-wildduck/redis \
/opt/docker/privatebin/data \
/opt/docker/rocket/redis \
/opt/docker/rocket/mongo \
/opt/docker/wp_multisite/db_data \
/opt/docker/bigbluebutton/db \
/opt/docker/elk/elastic \
/opt/docker/elk/file

5
scripts/backup-minetest.sh Archivo ejecutable
Ver fichero

@@ -0,0 +1,5 @@
#!/bin/sh
tar -Jcpf minetest/backups/backup-minetest-$(date +%d%m%Y).tar.xz ./minetest/minetest
for i in $(ls -t1 minetest/backups/ | tail -n +10); do
rm minetest/backups/$i
done

6
scripts/backup.sh Archivo ejecutable
Ver fichero

@@ -0,0 +1,6 @@
#!/bin/sh
tar --exclude=./opt/docker/doom/games/web --exclude=./registry/registry --exclude=./backups -cpf - . | 7z a backups/docker-compose-$(date +%d%m%Y).xz -t7z -mx=9 -mmt1 -ph4tth13v3s. -si
for i in $(ls -t1 backups/ | tail -n +20); do
rm backups/$i
done

3
scripts/clean-docker.sh Archivo ejecutable
Ver fichero

@@ -0,0 +1,3 @@
#!/bin/bash
truncate -s 0 /var/lib/docker/containers/*/*-json.log
docker system prune --volumes -f

37
scripts/containers.txt Archivo normal
Ver fichero

@@ -0,0 +1,37 @@
arjion
bigbluebutton
bind9
codimd
coturn
crossposter
dvwa
elk
etherpad
fail2ban
familyark
g
gitea
glances
haraka-wildduck
hatbot
icecast2
kamailio
kanban
magicworld
mumble
mumble-web
nextcloud
nginx
nms
peertube
pleroma
privatebin
prosody
quake
registry
rocket
tail
theia
wordpress
wp_multisite
youtube

3
scripts/daemon.sh Archivo ejecutable
Ver fichero

@@ -0,0 +1,3 @@
#!/bin/bash
sleep 120s
reboot

3
scripts/docker-clear Archivo ejecutable
Ver fichero

@@ -0,0 +1,3 @@
#/bin/bash
docker system prune -f -a
truncate -s 0 /var/lib/docker/containers/*/*-json.log

12
scripts/reset-netmail.sh Archivo ejecutable
Ver fichero

@@ -0,0 +1,12 @@
#!/bin/bash
cd /opt/docker/nginx; docker-compose down
cd /opt/docker/peertube; docker-compose down
cd /opt/docker/rocket; docker-compose down
cd /opt/docker/gitea; docker-compose down
cd /opt/docker/haraka-wildduck; docker-compose down
cd /opt/docker/haraka-wildduck; docker-compose up -d
cd /opt/docker/gitea; docker-compose up -d
cd /opt/docker/rocket; docker-compose up -d
cd /opt/docker/peertube; docker-compose up -d
cd /opt/docker/nginx; docker-compose up -d

7
scripts/restart-containers.sh Archivo ejecutable
Ver fichero

@@ -0,0 +1,7 @@
#!/bin/bash
for i in $(cat containers.txt); do
cd /opt/docker/$i
COMPOSE_HTTP_TIMEOUT=99999 docker-compose down
COMPOSE_HTTP_TIMEOUT=99999 docker-compose down
COMPOSE_HTTP_TIMEOUT=99999 docker-compose up -d
done

18
scripts/restart-docker0.sh Archivo ejecutable
Ver fichero

@@ -0,0 +1,18 @@
#!/bin/bash
IFADDR="172.17.0.1/24"
#if [[ ip link show docker0 ]]; then
iptables -t nat -F
ifconfig docker0 down
brctl delbr docker0
#fi
#if [[ ! ip link show docker0 ]]; then
ip link add docker0 type bridge
ip addr add "$IFADDR" dev docker0
ip link set docker0 up
iptables -t nat -A POSTROUTING -s "$IFADDR" ! -d "$IFADDR" -j MASQUERADE
#fi

2
scripts/stats.sh Archivo ejecutable
Ver fichero

@@ -0,0 +1,2 @@
#!/bin/bash
docker stats --no-stream --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemPerc}}"

8
scripts/test-backup.sh Archivo ejecutable
Ver fichero

@@ -0,0 +1,8 @@
tar --exclude=./opt/docker/doom/games/web \
--exclude=./registry/registry \
--exclude=./backups \
--exclude=./mastodon/mastodon/media_attachments \
--exclude=./pleroma/pleroma/uploads \
--exclude=./gnusocial/gnusocial/files \
--exclude=*.old \
-Jpcf /tmp/test.tar.xz /opt/docker

5
scripts/unban.sh Archivo ejecutable
Ver fichero

@@ -0,0 +1,5 @@
#!/bin/bash
fail2ban-client set sshd unbanip $1
cd /opt/docker/fail2ban && docker-compose exec fail2ban fail2ban-client set sshd unbanip $1 && cd -
echo -e "\nUNBANNED: $1\nDONE."
exit 0

12
scripts/update-certs.sh Archivo ejecutable
Ver fichero

@@ -0,0 +1,12 @@
#!/bin/bash
# dehydrated -c -t dns-01 -o /root/letsencrypt -d "hatthieves.es *.hatthieves.es" -k /etc/dehydrated/manual.rb
cat /root/letsencrypt/hatthieves.es/fullchain.pem > /opt/docker/secure/fullchain.pem
cat /root/letsencrypt/hatthieves.es/privkey.pem > /opt/docker/secure/privkey.pem
cd /opt/docker/nginx; docker-compose down; docker-compose up -d
cd /opt/docker/haraka-wildduck; docker-compose down; docker-compose up -d
cd /opt/docker/prosody; docker-compose down; docker-compose up -d
cd /opt/docker/coturn; docker-compose down; docker-compose up -d
cd /opt/docker/mumble; docker-compose down; docker-compose up -d
cd /opt/docker/rocket; docker-compose down; docker-compose up -d
echo -e "\nCERTS UPDATED!! :-)"
exit 0

132
scripts/url-attack.txt Archivo normal
Ver fichero

@@ -0,0 +1,132 @@
"/usr/local/nginx/html/2018/wp-admin/install.php"
"/usr/local/nginx/html/2018/wp-admin/setup-config.php"
"/usr/local/nginx/html/2019/wp-admin/install.php"
"/usr/local/nginx/html/2019/wp-admin/setup-config.php"
"/usr/local/nginx/html/a2billing/admin/Public/index.php"
"/usr/local/nginx/html/admin/config.php"
"/usr/local/nginx/html/administrator/index.php"
"/usr/local/nginx/html/agSearch/SQlite/main.php"
"/usr/local/nginx/html/assets/wp-admin/install.php"
"/usr/local/nginx/html/assets/wp-admin/setup-config.php"
"/usr/local/nginx/html/asterisk/admin/config.php"
"/usr/local/nginx/html/backup/wp-admin/install.php"
"/usr/local/nginx/html/backup/wp-admin/setup-config.php"
"/usr/local/nginx/html/bk/wp-admin/install.php"
"/usr/local/nginx/html/bk/wp-admin/setup-config.php"
"/usr/local/nginx/html/blogs/wp-login.php"
"/usr/local/nginx/html/blog/wp-admin/install.php"
"/usr/local/nginx/html/blog/wp-admin/setup-config.php"
"/usr/local/nginx/html/blog/wp-login.php"
"/usr/local/nginx/html/Blog/wp-login.php"
"/usr/local/nginx/html/cgi-bin/php"
"/usr/local/nginx/html/cgi-bin/php5"
"/usr/local/nginx/html/cms/wp-admin/install.php"
"/usr/local/nginx/html/cms/wp-admin/setup-config.php"
"/usr/local/nginx/html/demo/wp-admin/install.php"
"/usr/local/nginx/html/demo/wp-admin/setup-config.php"
"/usr/local/nginx/html/demo/wp-login.php"
"/usr/local/nginx/html/dev/wp-admin/install.php"
"/usr/local/nginx/html/dev/wp-admin/setup-config.php"
"/usr/local/nginx/html/english/wp-login.php"
"/usr/local/nginx/html/en/wp-login.php"
"/usr/local/nginx/html/fckeditor/editor/filemanager/connectors/php/upload.php"
"/usr/local/nginx/html/forum.php"
"/usr/local/nginx/html/fpbx/admin/config.php"
"/usr/local/nginx/html/home/wp-admin/install.php"
"/usr/local/nginx/html/home/wp-admin/setup-config.php"
"/usr/local/nginx/html/home/wp-login.php"
"/usr/local/nginx/html/html/admin/config.php"
"/usr/local/nginx/html/index.php"
"/usr/local/nginx/html/info/wp-login.php"
"/usr/local/nginx/html/main.php"
"/usr/local/nginx/html/main/wp-admin/install.php"
"/usr/local/nginx/html/main/wp-admin/setup-config.php"
"/usr/local/nginx/html/myasterisk/admin/config.php"
"/usr/local/nginx/html/news/wp-login.php"
"/usr/local/nginx/html/new/wp-admin/install.php"
"/usr/local/nginx/html/new/wp-admin/setup-config.php"
"/usr/local/nginx/html/new/wp-login.php"
"/usr/local/nginx/html/notice/9pHPxxmMPDQ50lEAwC"
"/usr/local/nginx/html/notice/9phPy2789A1AXvps1I"
"/usr/local/nginx/html/old/wp-admin/install.php"
"/usr/local/nginx/html/old/wp-admin/setup-config.php"
"/usr/local/nginx/html/old/wp-login.php"
"/usr/local/nginx/html/pbx/admin/config.php"
"/usr/local/nginx/html/phpmyadmin"
"/usr/local/nginx/html/phpMyAdmin"
"/usr/local/nginx/html/phpMyAdmin-4.2.1-all-languages"
"/usr/local/nginx/html/phpMyAdmin-4.2.1-english"
"/usr/local/nginx/html/portal/wp-admin/install.php"
"/usr/local/nginx/html/portal/wp-admin/setup-config.php"
"/usr/local/nginx/html/portal/wp-login.php"
"/usr/local/nginx/html/press/wp-login.php"
"/usr/local/nginx/html/scripts/m/query.php"
"/usr/local/nginx/html/sites/wp-login.php"
"/usr/local/nginx/html/site/wp-admin/install.php"
"/usr/local/nginx/html/site/wp-admin/setup-config.php"
"/usr/local/nginx/html/site/wp-login.php"
"/usr/local/nginx/html/sitio/wp-login.php"
"/usr/local/nginx/html/sqlite/main.php"
"/usr/local/nginx/html/SQlite/main.php"
"/usr/local/nginx/html/SQLite/main.php"
"/usr/local/nginx/html/SQLiteManager-1.2.4/main.php"
"/usr/local/nginx/html/sqlitemanager/main.php"
"/usr/local/nginx/html/SQLiteManager/main.php"
"/usr/local/nginx/html/SQLite/SQLiteManager-1.2.4/main.php"
"/usr/local/nginx/html/temp/wp-admin/install.php"
"/usr/local/nginx/html/temp/wp-admin/setup-config.php"
"/usr/local/nginx/html/test/sqlite/SQLiteManager-1.2.0/SQLiteManager-1.2.0/main.php"
"/usr/local/nginx/html/test/wp-admin/install.php"
"/usr/local/nginx/html/test/wp-admin/setup-config.php"
"/usr/local/nginx/html/tmp/wp-admin/install.php"
"/usr/local/nginx/html/tmp/wp-admin/setup-config.php"
"/usr/local/nginx/html/typo3/phpmyadmin"
"/usr/local/nginx/html/users/9kyphp5UvRxCxbwFLE"
"/usr/local/nginx/html/users/9l9DyUDHi1phpz8Pbs"
"/usr/local/nginx/html/users/9lzCGkBBqNMrJnPHpw"
"/usr/local/nginx/html/v1/wp-admin/install.php"
"/usr/local/nginx/html/v1/wp-admin/setup-config.php"
"/usr/local/nginx/html/v2/wp-admin/install.php"
"/usr/local/nginx/html/v2/wp-admin/setup-config.php"
"/usr/local/nginx/html/vendor/phpunit/phpunit/build.xml"
"/usr/local/nginx/html/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php"
"/usr/local/nginx/html/vtigercrm/vtigerservice.php"
"/usr/local/nginx/html/web/wp-admin/install.php"
"/usr/local/nginx/html/web/wp-admin/setup-config.php"
"/usr/local/nginx/html/web/wp-login.php"
"/usr/local/nginx/html/wordpress/wp-admin/install.php"
"/usr/local/nginx/html/wordpress/wp-admin/setup-config.php"
"/usr/local/nginx/html/wordpress/wp-login.php"
"/usr/local/nginx/html/Wordpress/wp-login.php"
"/usr/local/nginx/html/wp1/wp-admin/install.php"
"/usr/local/nginx/html/wp1/wp-admin/setup-config.php"
"/usr/local/nginx/html/wp2/wp-admin/install.php"
"/usr/local/nginx/html/wp2/wp-admin/setup-config.php"
"/usr/local/nginx/html/wp-admin/admin-ajax.php"
"/usr/local/nginx/html/wp-admin/install.php"
"/usr/local/nginx/html/wp-admin/setup-config.php"
"/usr/local/nginx/html/wp-config.php~"
"/usr/local/nginx/html/wp-config.php_"
"/usr/local/nginx/html/wp-config.php"
"/usr/local/nginx/html/wp-config.php.1"
"/usr/local/nginx/html/wp-config.php.backup"
"/usr/local/nginx/html/wp-config.php.bak"
"/usr/local/nginx/html/wp-config.php.disabled"
"/usr/local/nginx/html/wp-config.php.new"
"/usr/local/nginx/html/wp-config.php.old"
"/usr/local/nginx/html/wp-config.php_orig"
"/usr/local/nginx/html/wp-config.php.orig"
"/usr/local/nginx/html/wp-config.php.save"
"/usr/local/nginx/html/wp-config.php.swp"
"/usr/local/nginx/html/wp-content/plugins/google-mp3-audio-player/direct_download.php"
"/usr/local/nginx/html/wp-content/plugins/recent-backups/download-file.php"
"/usr/local/nginx/html/wp-content/plugins/simple-image-manipulator/controller/download.php"
"/usr/local/nginx/html/wp-content/plugins/wptf-image-gallery/lib-mbox/ajax_load.php"
"/usr/local/nginx/html/wp-content/themes/mTheme-Unus/css/css.php"
"/usr/local/nginx/html/wp-login.php"
"/usr/local/nginx/html/wpmu/wp-login.php"
"/usr/local/nginx/html/wp/wp-admin/install.php"
"/usr/local/nginx/html/wp/wp-admin/setup-config.php"
"/usr/local/nginx/html/wp/wp-login.php"
"/usr/local/nginx/html/www/admin/config.php"
"/usr/local/nginx/html/xampp/phpmyadmin"