Elasticsearch allocation settings
Allocation setting example, work both for cluster setting or index settings
Allocation setting example, work both for cluster setting or index settings
check statusipsec status
check connectionsipsec statusall
check certsipsec listcerts
Set at the beginning of bash script:
set -Eeuxo pipefail
set -e
The -e option will cause a bash script to exit immediately when a command fails.
nmap - checking open ports and footprinting
MSF - Metasploit framework
DIRB - enumerate files on webserver
Wireshark - network analytics
Wfuzz - bruteforcing web applications
sqlmap - detection and exploitation of SQL injection flaws
10 pillars of IT security:
1. Sanitize Inputs
2. Audit services
3. Backups onsite && ofsite , test backups
4. Principle of least privileges (no one logs as root, ever)
5. Zero trust networks, 2FA
6. Key-based authetification
In case you accidentally commit file you did not want, e.g. .swp from vim use:
git rm unwanted_file.swp
Check if file does not appear anymoregit commit --amend
Export and Import packages list
Exportdpkg --get-selections
Importdpkt --set-selections
In order to issue direct command on server via ansible:
ansible [pattern] -m [module] -a "[module options]"
ansible webservers -e "ansible_user=root" -m shell -a "/etc/init.d/nginx restart"
Stash all changed filesgit stash --include-untracked
Stash with commentsgit stash save --include-untracked 'message'
Unstash changes back to branch git stash pop
git stash pop stash@{STASH_NUMBER}