Helpful Linux Commands

This is mostly for me, but you can use it for you. Fix Permissions, common for WEB find . -type d -exec chmod 755 {} \; find . -type f -exec chmod 644 {} \; Additionally for WordPress. chmod 444 wp-config.php .htaccess Compress folders into tar-gz tar -pczf archive.tgz /folder Change the Hostname properly in centos hostnamectl set-hostname server.example.com Tmux Continue reading Helpful Linux Commands

Cut down on Fail2Ban occourances with GeoIP Filtering

Fail2ban is a great way to protect your system but one way to easily cut down on brute-force attempts is to mitigate the area in which users can access those ports. For me, I do not need international calling, so I will be blocking all NON-US Subnets. Specifically for FreePBX (CENTOS) yum install kernel-devel-`uname -r` iptables-devel kernel-headers-`uname -r` rpm -Uvh Continue reading Cut down on Fail2Ban occourances with GeoIP Filtering

US Only VPS (Ubuntu Specific)

This guide worked for me with a few exceptions, I additionally Ran apt-get install xtables-addons-common xtables-addons-dkms xtables-addons-source Once this is done, I change my default-accept policy to US Only accept. iptables -A INPUT -m geoip –src-cc US -j ACCEPT iptables -I INPUT -j DROP iptables-save Simple way to reduce the excessive Fail2Ban occurrences.

qmail outbound email monitor / blacklist prevention script.

Origional Post: Stop-Outbound-SMTP-Automatically-on-Mail-Queue-Size-Alert This is cool, HOWEVER how do you send an email if you just blocked outbound email? I’ve updated the line to directly send via my email server, as long as I am not using port 25, I’m fine (I permit internal relay on my internal IP) echo “Port 25 has been disabled in the firewall for outbound Continue reading qmail outbound email monitor / blacklist prevention script.

Raspberry Pi as Night Ringer OR Intercom

Update: Since this post we started using USB Audio dongles for better quality over the internal audio ports, removing the need to use the loopback driver /sbin/modprobe snd-aloop Thanks Ed for the reminder! So I absolutely hate adapting ATA’s or whatever to use with old intercom systems, and Valcom’s solution is way over priced for what most people need. This Continue reading Raspberry Pi as Night Ringer OR Intercom