Quantcast
Channel: linux – Logisek Security Blog
Browsing latest articles
Browse All 54 View Live

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 latest articles
Browse All 54 View Live




Latest Images