This file contains hidden or 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
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: wordpress-mysql | |
| labels: | |
| app: wordpress | |
| spec: | |
| ports: | |
| - port: 3306 | |
| selector: |
This file contains hidden or 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
| ## If you are on a 64 bit platform, everything should be running | |
| ## in 64 bit mode. This rule will detect any use of the 32 bit syscalls | |
| ## because this might be a sign of someone exploiting a hole in the 32 | |
| ## bit API. | |
| -a always,exit -F arch=b32 -S all -F key=32bit-abi | |
| ## Executions. | |
| -a always,exit -F arch=b64 -S execve,execveat -k exec | |
| ## External access (warning: these can be expensive to audit). |
This file contains hidden or 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
| TODAY=`date +%Y.%m.%d` | |
| URL="http://127.0.0.1:9200" | |
| close_week_old_indices() | |
| { | |
| WEEK_FROM_TODAY=`date +%Y.%m.%d -d -7days` | |
| INDEX=*beat*-$WEEK_FROM_TODAY | |
| curl -XPOST $URL/$INDEX/_close | |
| } |
This file contains hidden or 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
| version: "2" | |
| services: | |
| db: | |
| image: mariadb | |
| # uncomment the following two lines for data persistence | |
| #volumes: | |
| # - ./db_data:/var/lib/mysql | |
| environment: | |
| - MYSQL_ROOT_PASSWORD=simplepw |
This file contains hidden or 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
| sudo strace -f $(pidof php-fpm5.6 | sed 's/\([0-9]*\)/\-p \1/g') |
This file contains hidden or 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
| cd /tmp && git clone git://github.com/aabc/ipt-netflow.git ipt-netflow && cd ipt-netflow/ | |
| apt-get -y install module-assistant | |
| m-a prepare | |
| ./configure && make all install | |
| depmod | |
| modprobe ipt_NETFLOW destination={YOUR NETFLOW COLLETOR}:9995 | |
| iptables -I FORWARD -j NETFLOW | |
| iptables -I INPUT -j NETFLOW | |
| iptables -I OUTPUT -j NETFLOW |
This file contains hidden or 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
| sudo apt-get install -y python-dev python-pip | |
| sudo pip install ansible | |
| sudo ansible-galaxy install geerlingguy.apache geerlingguy.mysql geerlingguy.php | |
| wget https://gist.githubusercontent.com/popstas/61a5ddce08fe1a269f62576808cee54e/raw/de7bceea261f5a76fd88d8673046e5e18be7e35a/lamp.yml | |
| ansible-playbook -i 'localhost,' -c local lamp.yml |
This file contains hidden or 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
| <!doctype html> | |
| <title>Site Maintenance</title> | |
| <style> | |
| body { text-align: center; padding: 150px; } | |
| h1 { font-size: 50px; } | |
| body { font: 20px Helvetica, sans-serif; color: #333; } | |
| article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
| a { color: #dc8100; text-decoration: none; } | |
| a:hover { color: #333; text-decoration: none; } | |
| </style> |
This file contains hidden or 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
| wget --no-check-certificate http://sourceforge.net/projects/jboss/files/JBoss/JBoss-5.1.0.GA/jboss-5.1.0.GA.zip/download -O /tmp/jboss-5.1.0.GA.zip | |
| mv /tmp/jboss-5.1.0.GA.zip /usr/share/jboss-5.1.0.GA.zip | |
| cd /usr/share | |
| unzip -q jboss-5.1.0.GA.zip | |
| groupadd jboss |
This file contains hidden or 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
| sudo yum -y install java-1.8.0-openjdk-devel | |
| yum install -y wget unzip | |
| sudo useradd -m -U -d /opt/tomcat -s /bin/false tomcat | |
| cd /tmp | |
| wget http://apache.panu.it/tomcat/tomcat-8/v8.5.31/bin/apache-tomcat-8.5.31.zip | |
| unzip apache-tomcat-*.zip | |
| sudo mv apache-tomcat-*/ /opt/tomcat/ | |
| sudo chown -R tomcat: /opt/tomcat |