Skip to content

Instantly share code, notes, and snippets.

View linuxmalaysia's full-sized avatar
🏠
Working from home

Harisfazillah Jamel linuxmalaysia

🏠
Working from home
View GitHub Profile
@linuxmalaysia
linuxmalaysia / logstash-config-example-searching-filebeat-index.txt
Created October 13, 2019 02:33
Example logstash configuration file. Tested using Logstash 7.4.0 and Filebeat as input and Elasticsearch. Terima Kasih Kepada Amir Haris Ahmad, Localhost Sdn Bhd # kerana izinkan saya gunakan servers ujian mereka di Digital Ocean # dan team beliau dengan berkongsi pengalaman dan pandangan mereka. # Untuk saya menguji bruteforce attack log kepada…
### Terima Kasih Kepada Amir Haris Ahmad, Localhost Sdn Bhd
### kerana izinkan saya gunakan servers ujian mereka di Digital Ocean
### dan team beliau dengan berkongsi pengalaman dan pandangan mereka.
###
### Untuk saya menguji bruteforce attack log kepada syslog dengan fail2ban
###
### Server telah dipasang dengan fail2ban dan SSH dibuka dengan port 22.
### SSH tidak membenarkan module password dan hanya digital cert.
###
### Filebeat telah digunakan untuk mengumpulkan log.
#!/bin/sh
# origin https://gist.github.com/erlepereira/c11f4f7a3f60cd2071e79018e895fc8a
# logstash yaml "www.google.com": "known search engine"
# Choose from here https://github.com/StevenBlack/hosts
#HOSTS_RAW=https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
##### https://raw.githubusercontent.com/StevenBlack/hosts/master/data/malwaredomainlist.com/hosts
### first must using > and others using >> for pipe
##### first file
@linuxmalaysia
linuxmalaysia / README-autossh-systemd.txt
Last active April 3, 2024 16:33
Autossh using systemd
1) ==== Autossh using systemd ====
Example from
https://gist.github.com/drmalex07/c0f9304deea566842490
2) =============
Install autossh
@linuxmalaysia
linuxmalaysia / logstash-windows-events.txt
Last active March 15, 2024 13:51
logstash windows events from winlogbeat. Translate common Event ID's and Translate common Event ID's to Quadrants
input {
beats {
id => "01-beats-input"
port => 55044
tags => "winlogbeat"
}
}
Config Untuk Listbot
Contoh diambil dari
https://github.com/dtag-dev-sec/listbot
1) Git clone masukkan dalam /etc/logstash
@githubfoam
githubfoam / Gluster Cheat Sheet
Last active January 15, 2024 20:23
Gluster Cheat Sheet
Brick –> is basic storage (directory) on a server in the trusted storage pool.
Volume –> is a logical collection of bricks.
Cluster –> is a group of linked computers, working together as a single computer.
Distributed File System –> A filesystem in which the data is spread across the multiple storage nodes and allows the clients to access it over a network.
Client –> is a machine which mounts the volume.
Server –> is a machine where the actual file system is hosted in which the data will be stored.
Replicate –> Making multiple copies of data to achieve high redundancy.
Fuse –> is a loadable kernel module that lets non-privileged users create their own file systems without editing kernel code.
glusterd –> is a daemon that runs on all servers in the trusted storage pool.
RAID –> Redundant Array of Inexpensive Disks (RAID) is a technology that provides increased storage reliability through redundancy
@rohankhudedev
rohankhudedev / opcache.ini
Last active May 7, 2024 08:36
Best Zend OpCache Settings / Tuning / Configurations
[opcache]
; Determines if Zend OPCache is enabled
opcache.enable=1
; Determines if Zend OPCache is enabled for the CLI version of PHP
;opcache.enable_cli=1
; The OPcache shared memory storage size.
opcache.memory_consumption=512
@holmberd
holmberd / php-pools.md
Last active May 17, 2024 07:21
Adjusting child processes for PHP-FPM (Nginx)

Adjusting child processes for PHP-FPM (Nginx)

When setting these options consider the following:

  • How long is your average request?
  • What is the maximum number of simultaneous visitors the site(s) get?
  • How much memory on average does each child process consume?

Determine if the max_children limit has been reached.

  • sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
@sergey-dryabzhinsky
sergey-dryabzhinsky / sysctl-proxmox-tune.conf
Last active May 19, 2024 21:22
Most popular speedup sysctl options for Proxmox. Put in /etc/sysctl.d/
###
# Proxmox or other server kernel params cheap tune and secure.
# Try it if you have heavy load on server - network or memory / disk.
# No harm assumed but keep your eyes open.
#
# @updated: 2020-02-06 - more params used, adjust some params values, more comments on params
#
### NETWORK ###
@ruanbekker
ruanbekker / deploy-automated-hadoop-setup-on-lxd.sh
Last active April 22, 2024 21:36
Sets up a Hadoop 3 Node Cluster with LXC Containers on LXD (Automated Install)
#!/bin/bash
set -ex
UBUNTU_VERSION="14.04"
mkdirs(){
#lxc delete hadoop-master --force
#lxc delete hadoop-slave-1 --force
#lxc delete hadoop-slave-2 --force
rm -rf /tmp/*