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
#### install mode Security NGINX | |
# update | |
yum update -y && yum groupinstall -y "Development Tools" && yum install gcc-c++ flex bison yajl yajl-devel curl-devel curl GeoIP-devel doxygen zlib-devel -y && yum install lmdb lmdb-devel libxml2 libxml2-devel ssdeep ssdeep-devel lua lua-devel pcre-devel -y | |
### Add Repo NGINX |
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
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: metrics-server | |
namespace: kube-system | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: |
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
yum install nano -y | |
sed -i 's/#UseDNS yes/UseDNS no/'g /etc/ssh/sshd_config | |
sed -i 's/#GSSAPIAuthentication yes/GSSAPIAuthentication no/'g /etc/ssh/sshd_config | |
setenforce 0 | |
sed -i 's/^SELINUX=.*/SELINUX=permissive/g' /etc/selinux/config | |
cat /etc/selinux/config | grep SELINUX= | |
yum -y install httpd nano | |
systemctl start httpd | |
systemctl enable httpd | |
yum -y install epel-release |
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
### Centos | |
yum install fping -y | |
cat >/etc/zabbix/zabbix_agentd.conf.d/icmp.conf << EOF | |
Timeout=30 | |
UserParameter=icmp[*],fping -t 300 $1 | grep alive | wc -l | |
EOF | |
### Ubuntu | |
apt update | |
apt install fping -y |
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
### Backup | |
docker exec -i name_container(mysql/mariadb) mysqldump -uroot -ptest1! (nama table) > backup.sql | |
### Restore | |
docker exec -i name_container(mysql/mariadb) mysql-uroot -ptest1! (nama table) < backup.sql |
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
install wazuh & ELK | |
#Add Repo | |
cat > /etc/yum.repos.d/wazuh.repo <<\EOF | |
[wazuh_repo] | |
gpgcheck=1 | |
gpgkey=https://packages.wazuh.com/key/GPG-KEY-WAZUH | |
enabled=1 | |
name=Wazuh repository |
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
https://wiki.mikrotik.com/wiki/Manual:Interface/SSTP | |
how to enable SSTP with Comodo SSL, | |
first generate like normaly, | |
and you will get | |
crt in pk8 format, and convert it to crt, | |
and then import to mikrotik server, | |
key from generate, and crt, |
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
Cara mengconvert certificate .pfx | |
# openssl pkcs12 -in [namacertificate.pfx] -nocerts -out [namakey.key] | |
Fungsi perintah di atas adalah merubah dari .pfx menjadi .key namakey dapat di isikan bebas | |
# openssl pkcs12 -in [namacertificate.pfx] -clcerts -nokeys -out [namacertificate.crt] | |
Fungsi perintah di atas adalah merubah dari .pfx menjadi .crt nama .crt dapat di isikan bebas |
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
#menabahkan repo | |
cd /etc/yum.repos.d && wget https://repo.codeit.guru/codeit.el`rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release)`.repo | |
yum repolist | |
#install httpd | |
yum install httpd-2.4.25-1.el7.codeit.x86_64 | |
#setting setsebool | |
setsebool -P httpd_execmem=1 |