Ubuntu

The mcrypt extension is missing. Please check your PHP configuration

After a quick LAMP install, I decided to install PhpMyAdmin. Logging into I noticed a warring message that read:

The mcrypt extension is missing. Please check your PHP configuration

To resolve this I attempted the following:

  • Elevated my console to root (sudo -i)
  • apt-get install mcrypt
  • apt-get install php5-mcrypt (no need because the previous command did it for me)
  • php5enmod mcrypt
  • service apache2 restart

If the above steps don’t work introduce the following: ln -s /etc/php5/conf.d/mcrypt.ini /etc/php5/mods-available

Now my LAMP install is complete.

 

Tech Short: Ubuntu Server System Information on login

If you have run Ubuntu Server you may have noticed that each time you log into your system via SSH system information  status are displayed.

I have wondered this for a while now and tonight I found out.

The command to reproduce this information is
landscape-sysinfo

This command is run from /etc/update-motd.d/50-landscape-sysinfo and exists when the landscape common package is installed on the server from what I have read.

And now I know.

A look inside the script:

#!/bin/sh
cores=$(grep -c ^processor /proc/cpuinfo 2>/dev/null)
[ “$cores” -eq “0” ] && cores=1
threshold=”${cores:-1}.0″
if [ $(echo “cut -f1 -d ' ' /proc/loadavg < $threshold” | bc) -eq 1 ]; then
echo
echo -n ” System information as of “
/bin/date
echo
/usr/bin/landscape-sysinfo
else
echo
echo ” System information disabled due to load higher than $threshold”
fi

#eof

Finally I can Watch Netflix in Ubuntu

Hi all,

I just read on the Ubuntu insights that watching Netflix is now a thing for Ubuntu. Recent efforts have finally paid off and Canonical, Ubuntu now supports it when using Google Chrome version 37 and above.

I big thanks goes out to those at Netflix and Ubuntu for making this “official”. I’ve personally waiting a long time for this.

Monitoring Tor resource usage

A while back I wrote about how I setup a small yet effective Tor network proxy server titled “My Quick Tor Socks / Web Proxy“.

After running this for sometime now I wanted to get some real time status, but more than that I wanted it to look cool. And this brings me to what I recently found.

And that my friends is Arm:

The anonymizing relay monitor (arm) is a CLI status monitor for Tor. This functions much like top does for system usage, providing real time statistics for:

  • resource usage (bandwidth, cpu, and memory usage)
  • general relaying information (nickname, fingerprint, flags, or/dir/controlports)
  • event log with optional regex filtering and deduplication
  • connections correlated against tor’s consensus data (ip, connection types, relay details, etc)
  • torrc configuration file with syntax highlighting and validation

This is what I was looking for 100%, and even better most of the attributes of arm can be adjusted via a configuration file. For additional information check out the project page here: https://www.atagar.com/arm/

Wow “jermal’ that’s cool, how do I set this up.

It’s very simple just follow the steps below:

  • SSH in or go to your Console
  • Once logged in do an apt-get update
  • Then apt-get install tor-arm -y
  • That’s it, once installed your ready

To run arm all you need to do is type: arm

happy monitoring folks.
*you can even press ‘n’ for a new Tor identity at anytime*

My Quick TOR Socks / Web Proxy

I originally preformed similar steps to setup a raspberry pi for this reason, later using a very tiny Ubuntu server install.

  1. Using a clean Ubuntu / or / Debian installation (recommended, not necessary) add the following repositories to /etc/apt/sources.list: deb http://deb.torproject.org/torproject.org <DISTRIBUTION> main
  2. to figure out the name of your distribution. A quick command to run is lsb_release –c (Ubuntu) or cat /etc/debian_version (Debian)
  3. Next add the gpg key that was used to sign the TOR packages: gpg –keyserver keys.gnupg.net –recv 886DDD89
  4. Then, type sudo apt-get install deb.torproject.org-keyring
  5. Next type sudo apt-get update
  6. Next type apt-get install tor
  7. Once completed TOR will be installed and listening on port 9050 on 127.0.0.1 of the host. You will need to modify the following file /etc/tor/torrc and add your servers address and SOCKS Port to listen on.
  8. Once completed you can restart the tor service and test remotely with a machine on your network; assign a web browser the SOCKS proxy info for your server and test with: https://check.torproject.org/ if all working you will be notified that you are on the TOR network.

But what if you don’t want to use SOCKS or an application / device doesn’t have a configuration for SOCKS proxy?  Well I encounter this same thing and there is a fix for that.

Using privoxy you can proxy your data via the computers current network, a VPN tunnel and in our case a SOCKS proxy.

  1. Back onyour server type  sudo apt-get update , then sudo apt-get install privoxy
  2. Once installed you will need to edit the following file: /etc/privoxy/config
  3. You need to:
  4. add a listen address and port for your client machines to use.
  5. you need to setup a forward-socks5 connection, something like: forward-socks5  / 127.0.0.1:9050
  6. Restart the privoxy server and your good to test. As we did above, setup your web browser with the proxy settings and check the following address https://check.torproject.org/ all should be working and you have an always on TOR Network proxy.

For more info on TOR: https://www.torproject.org