Manually Install Kali Linux 2018.4 x64 with VM Fusion 10

Problem Kali Linux 2018.4 x64 fails to install manually when using VM Fusion 10.1.5 (hangs during “copying data to disk” portion of the install). Solution Create a new Custom VM Select the iso you downloaded When prompted for the OS of ISO select “Debian 8.x 64 bit” Name the VM ‘kali-linux-2018.4-vm-amd64’ (not required) Set the... » read more

Block Countries Behind ELB

To block countries behind an ELB (Elastic Load Balancer) you should use Maxmind’s GeoIP Country Database. Problem You are unable to use iptables or ipset to block countries because of your Amazon Elastic Load Balancer Solution Use Maxmind’s GeoIP Country Database in conjunction with Apache or NGINX Example This example is for Ubuntu 12.04 (Precise)... » read more

Ubuntu Set Timezone to UTC

Objective: Set Timezone to UTC on Ubuntu 12.04 LTS Howto You will be using tzdata and ntpdate Setting the timezone After running this select “etc” (hit enter) then select “UTC” (hit enter) pkg-reconfigure tzdata Syncing the clock apt-get -y install ntpdate ntpdate pool.ntp.org Updating crontab to sync clock daily crontab -l > tmp.cron echo "@daily... » read more

Apache ProxyPass with dynamic hostname

To use Apache ProxyPass directives with dynamic hostnames you will need to also use ModRewrite. Objective All requests to the virtualhost will ProxyPass and ProxyPassReverse (also known as an “Apache Gateway”) to the %{HTTP_HOST} The only reason this would make sense to do is if you have localhost entries on the apache server for specfic... » read more

Ensure Beaver Log Shipping is Running

I have a love hate relationship with the beaver log shipper and ensuring that it is in fact running on all of my machines (and not in a defunct or partially running state) I have finally whipped up a script to take care of this issue and thought i’d share it for anyone that cares.... » read more

my bash prompt

Installation Modify ~/.bashrc and append this line PS1="\n\[\e[32;1m\][\[\e[37;1m\]\[email protected]\h:\[\e[37;1m\]\w\[\e[32;1m\]]\\$ \[\e[0m\]" My Bash Prompt To replace yours in one command with this one sed -i 's~PS1.*~PS1="\\n\\[\\e[32;1m\\][\\[\\e[37;1m\\]\\[email protected]\\h:\\[\\e[37;1m\\]\\w\\[\\e[32;1m\\]]\\\\$ \\[\\e[0m\\]"~g' ~/.bashrc

Setup Email on Centos

To setup email on Centos 6 run these commands yum -y install sendmail mailutils chkconfig --levels 235 sendmail on service sendmail restart To send a test email echo "test message" | mail -s "test subject" [email protected] Hosts File Modify your hosts file and add $HOSTNAME.local to prevent issues (in example below we are using hostname... » read more

Add Current PATH to crontab

Add Current PATH to crontab Are you sick of your cron job failing because you are not explicitly listing the full path of everything in your shell script? Here’s how to fix it! Problem Your script works when you run it from the console but fails in cron. Cause Your crontab doesn’t have the right... » read more

How to Send Mail From Ubuntu Precise

Configuration To send mail from the command line in Ubuntu Precise sudo apt-get install mailutils If you mess up configuring or want to reconfigure dpkg-reconfigure mailutils Sending your test email Let’s send a test email! echo "test email body" | mail -s "test email subject" [email protected] Debugging issues tail -f /var/log/mail.err tail -f /var/log/mail.log Config... » read more