Quantcast
Channel: linux – Logisek Security Blog
Browsing all 54 articles
Browse latest View live

Change tmux default shell

Edit tmux.conf vim ~/.tmux.conf Append this line: set-option -g default-shell $SHELL Restart tmux tmux kill-server tmux

View Article


Image may be NSFW.
Clik here to view.

Change admin passwords

System sudo passwd root MySQL mysqladmin -u root -p password PostgreSQL sudo -u postgres psql -U postgres -h 127.0.0.1 -d postgres -c "ALTER USER postgres WITH PASSWORD 'newpassword';" Gitlab GLPI...

View Article


p7zip – file archiver

p7zip is the Unix command-line port of 7-Zip, a file archiver that handles the 7z format which features very high compression ratios. p7zip provides: – /usr/bin/7zr – a standalone minimal version of...

View Article

Sublime editor on Debian

Installation https://www.sublimetext.com/3 sudo dpkg -i sublime-text_build-xxxx_amd64.deb Dracula Theme https://draculatheme.com/sublime/ Preferences -> Color Scheme -> Dracula Color Scheme ->...

View Article

Linux notes and scripts for every day use

https://github.com/SwiftOnLinux/SmokingLinuxEveryDay Contents apache archlinux backup database debian dev documents encryption environment files gentoo misc openvpn samuraistfu security system web

View Article


Apache2 and Django installation on Debian

Install Apache2 sudo apt-get install apache2 -y sudo rm -f /var/www/html/index.html && sudo touch /var/www/html/index.html sudo a2enmod ssl sudo a2ensite default-ssl sudo service apache2...

View Article

Create an encrypted file container in Linux

Installations sudo apt-get install cryptsetup Create an empty file with the size of your container (e.g. 100MB) fallocate -l 100M mycontainer.img or dd if=/dev/urandom of=mycontainer.img bs=1M...

View Article

Apache Web Server Hardening & Security Script

Tested on Debian 9.x https://github.com/maldevel/blue-team Become root sudo su - Hide Apache2 version echo "ServerSignature Off" >> /etc/apache2/apache2.conf echo "ServerTokens Prod" >>...

View Article


Linux Users Hardening & Security Script

Tested on Debian 9.x https://github.com/maldevel/blue-team Set Maximum number of days a password may be used sed -i "s/^PASS_MAX_DAYS.*/PASS_MAX_DAYS 90/" /etc/login.defs Set Minimum number of days...

View Article


Basic iptables security script

Tested on Debian 9.x https://github.com/maldevel/blue-team Install iptables apt -y install iptables Install iptables-persistent apt -y install iptables-persistent systemctl enable netfilter-persistent...

View Article

Network Hardening & Security Script

Tested on Debian 9.x https://github.com/maldevel/blue-team Disable IP forwarding sed -i "s/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=0/" /etc/sysctl.conf sysctl -w net.ipv4.ip_forward=0 Disable packet...

View Article

SSH Hardening & Security Script

Tested on Debian 9.x https://github.com/maldevel/blue-team Set /etc/ssh/sshd_config ownership and access permissions chown root:root /etc/ssh/sshd_config chmod 600 /etc/ssh/sshd_config Change Port sed...

View Article

Nginx Hardening & Security Script

Tested on Debian 9.x https://github.com/maldevel/blue-team Hide nginx version sed -i "s/# server_tokens off;/server_tokens off;/g" /etc/nginx/nginx.conf Remove ETags sed -i 's/server_tokens...

View Article


Encrypting a second hard drive

Open GParted and delete all partitions on the disk you want to encrypt Encrypt the partition sudo cryptsetup -y -v luksFormat /dev/sda Decrypt the new partition so that you can format it with ext4 sudo...

View Article
Browsing all 54 articles
Browse latest View live