dah85.com

*not* just another blog ;)

I just noticed that crontab emails to root@localhost every single time it runs a job, and I have hundreds of thousands of emails (unread) thanks to crontab. This is annoying and here's how to stop it.

sudo nano /etc/crontab

Add a line that just says:

MAILTO=""

Alternatively, if you want to change the email that the notifications get sent to, you can change the value here.

Looking at a 400GB KVM from LETbox

- Posted in VPS by with comments

I found this great little KVM from LETbox on the lowendtalk forums and thought i'd do some benchmarking on it.

  • 2048MB Dedicated RAM
  • 2x vCPU @ 3.20+ GHz
  • 400 GB Dedicated HDD space (Raid10 SAS)
  • 10GB x SnapShot Backup
  • 3TB/Month @ 1 Gbps burstable
  • 1x IPv4 Free 5 Minutes Server Monitoring + Blacklist (Email and SMS alert)
  • Free SMS Unpaid invoice Alert
  • IPV4 rdns Management
  • 20Gbps DDoS-Shield Mitigation
  • KVM/Proxmox
  • $5.95/month / $65 /Yearly
CPU model:  Common KVM processor
Number of cores: 2
CPU frequency:  3300.022 MHz
Total amount of RAM: 1996 MB
Total amount of swap:  MB
System uptime:   2 days, 20:46,       
I/O speed:  92.0 MB/s
Bzip 25MB: 4.94s
Download 100MB file: 87.0MB/s

The server is on Proxmox, has a lot of different ISOs to choose from and is quite fast. Support are fairly helpful, and downtime is minimal but it has happened before. They reimbursed my account for a small downtime without even asking, so this is pretty good.

This is perfect for a < 400GB nextCloud or Plex setup. Mine recently exceeded this amount, so I've moved onto a different option from another provider, but my time with LETbox has been great!

Installing Webmin on Ubuntu Server

- Posted in Quick Tip by with comments

Here's how to install Webmin on your Ubuntu Server.

First, download the latest version:

wget http://prdownloads.sourceforge.net/webadmin/webmin_1.860_all.deb

Then install it with dpkg:

sudo dpkg -i webmin_1.860_all.deb

Oh noes, an error!1!eleven1!!

Unpacking webmin (1.860) ... dpkg: dependency problems prevent configuration of webmin: webmin depends on libnet-ssleay-perl; however: Package libnet-ssleay-perl is not installed. webmin depends on libauthen-pam-perl; however: Package libauthen-pam-perl is not installed. webmin depends on libio-pty-perl; however: Package libio-pty-perl is not installed. webmin depends on apt-show-versions; however: Package apt-show-versions is not installed. dpkg: error processing package webmin (--install): dependency problems - leaving unconfigured Processing triggers for systemd (229-4ubuntu7) ... Errors were encountered while processing: webmin

Yikes! Good thing there's a simple trick to fix dependency issues:

sudo apt -f install

And now it's installed and ready to use!

List of Storage VPS (100GB+)

- Posted in VPS by with comments

If you've ever wondered which storage VPS to get, then you will love this list I've made!

I will do my best efforts to keep it updated, but if you have any to add, please let me know!

The list can be found here or at the top right corner of the site in it's own page.

After falling in love with the other V-Dedi from WISHOSTING, I decide to test out another one. This time it's an Intel Avoton C2750-based box.

Here's the features:

8 CPU cores Avoton C2750
Dedicated CPU cores 2.4GHZ
7GB RAM
800GB HDD
Linux/Windows OS
Unmetered traffic
Best effort 1 Gbps bandwidth
1 IPv4
Location - France
Setup time up to 24 hours
[$14.99/month][2]

The differences between this package and the other one is this is $5 per month cheaper, has gigabit instead of 100mbit, but we trade off with an 800GB HDD instead of 1.8TB HDD and 7GB RAM instead of 15GB RAM. The big thing that I noticed is the 4 extra cores - 8 in total. I just had to benchmark this and see how it performs.

And here's some benchmarks which I will add to later:

CPU model:  Westmere E56xx/L56xx/X56xx (Nehalem-C)
Number of cores: 8
CPU frequency:  2399.998 MHz
Total amount of RAM: 6971 MB
Total amount of swap:  MB
System uptime:   7 min,       
I/O speed:  252 MB/s
Bzip 25MB: 12.49s
Download 100MB file: 96.1MB/s
CPU model:  Westmere E56xx/L56xx/X56xx (Nehalem-C)
Number of cores: 8
CPU frequency:  2399.998 MHz
Total amount of RAM: 6971 MB
Total amount of swap:  MB
System uptime:   5 days, 19:32,       
I/O speed:  43.7 MB/s
Bzip 25MB: 13.57s
Download 100MB file: 87.8MB/s

The Bzip time is almost 4 times higher, meaning it look 4 times longer than the i5 based system - expected behaviour for an Atom processor. The I/O is great and the network is gigabit, which we can see from the results.

It's a great deal, but the other package I have looks better for the extra storage and RAM. I will set this up for a month with nextCloud and Plex and see how well it handles those tasks. At this stage, I can't see it replacing the other V-Dedi from WISHOSTING.

Stay tuned, I'll update this as I go along.

UPDATE: So I've had this for close to a week now and I've been testing it, and it's a very capable dedi for the price. It's nice seeing the 8 cores in htop. I admit, I am struggling to find something else to love about this. Compared to the i5 server they have on offer, which is much noticeably faster than this atom server, coupled with the 1TB loss in storage, I feel like this server wouldn't suit my needs. Also, the extra 100ms in latency did give me some issues streaming plex during peak times, but that's what happens when it's 300+ms from France to Sydney.

I had a notification in my Ubuntu Server 17.04 terminal saying there's an update to the new version, 17.10, which I decided to do.

It all went smoothly until I fired up nextCloud and got 500 and 503 errors. Apache's error log (/var/log/apache2/error.log) showed a lot of PHP warnings like this;

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/igbinary.so' - /usr/lib/php/20151012/igbinary.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/imagick.so' - /usr/lib/php/20151012/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/memcache.so' - /usr/lib/php/20151012/memcache.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/redis.so' - /usr/lib/php/20151012/redis.so: cannot open shared object file: No such file or directory in Unknown on line 0

Those files didn't exist, this is weird. After trying all sorts of things I've found by googling frantically, the solution turned out to be simple - install the php-7.1 versions of the tools.

Here's what I install for nextCloud to work:

php7.1-gd php7.1-json php7.1-mysql php7.1-curl php7.1-mbstring php7.1-intl php7.1-mcrypt php-imagick php7.1-xml php7.1-zip php7.1 libapache2-mod-php7.1 php7.1-mysql php7.1-curl php7.1-gd php7.1-intl php-pear php-imagick php7.1-imap php7.1-mcrypt php-memcache  php7.1-pspell php7.1-recode php7.1-sqlite3 php7.1-tidy php7.1-xmlrpc php7.1-xsl php7.1-mbstring php-gettext php-redis

After installing those, I removed PHP-7.0 and restarted Apache and it all worked again!

I hope that helps someone :)

I recently decided to get this Hybrid Dedicated Server from WISHOSTING:

4 CPU cores i5-2400
Dedicated CPU cores 3.1GHz
15GB RAM
1800GB HDD
Linux/Windows OS
Unmetered 100Mbps bandwidth
1 IPv4
DDoS protection
Location - Canada
Setup time up to 24 hours
[$19.99/month][2]

This is my first time with a dedicated (or Hybrid in this case) and I'm extremely happy with it. I have the one that's located in Canada (Montreal) on OVH which is $19.99/month, there is another one that's the same specs but $17.99/month hosted in France (unsure of details). I went for the Canadian one since it has less latency to Australia than France does, especially during peak times.

Here's a benchmark:

CPU model:  Intel Xeon E312xx (Sandy Bridge)
Number of cores: 4
CPU frequency:  3092.972 MHz
Total amount of RAM: 14681 MB
Total amount of swap:  MB
System uptime:   3 days, 9:55,       
I/O speed:  73.0 MB/s
Bzip 25MB: 4.39s
Download 100MB file: 11.2MB/s

That is 100% dedicated to my use, a massive 1.8TB of HDD space 4 cores and 15GB RAM is awesome. From what I understand, this is hosted on a bare metal dedicated server but instead it uses the KVM platform to make it much easier to manage. This means the resources (CPU, IO, network, HDD, etc) are all used only by me, and you can really feel the difference!

This thing replaced a lot of my other VPS, I can now run nextCloud, Plex, and more off the dedicated server and it still has plenty of capacity left. Beforehand, I had 3 different VPS to serve those needs, and now they're all on the one server and it actually costs less this way.

I tested with Plex, and I can easily transcode at least 5 1080 movies at the same time without slowing down anything else, which is perfect for my needs. I could probably have tried more but I decided to only test 5.

Here's some more benchmarks which I will add to over time:

CPU model:  Intel Xeon E312xx (Sandy Bridge)
Number of cores: 4
CPU frequency:  3092.972 MHz
Total amount of RAM: 14681 MB
Total amount of swap:  MB
System uptime:   3 days, 10:01,       
I/O speed:  94.3 MB/s
Bzip 25MB: 4.05s
Download 100MB file: 11.2MB/s
CPU model:  Intel Xeon E312xx (Sandy Bridge)
Number of cores: 4
CPU frequency:  3092.972 MHz
Total amount of RAM: 14679 MB
Total amount of swap:  MB
System uptime:   6 days, 16:07,       
I/O speed:  79.0 MB/s
Bzip 25MB: 4.26s
Download 100MB file: 11.2MB/s

If you're looking for a great value dedicated server, I highly recommend this one, it's blown me away!

Testing an IntegralHost VPS

- Posted in VPS by with comments

I was looking for a cheap VPS with a dedicated IP in Canada to use as an Iodine DNS tunnel for an upcoming project. I was browsing Low End Box and I came across this deal from IntegralHost:

– 128 MB RAM – 1x vCPU – 5 GB HDD space – 100 GB transfer – 1Gbps uplink – 1x IPv4 – /64 IPv6 – OpenVZ/SolusVM – $8/year ORDER NOW It's located in Canada, which is perfect. $8/year is a bargain.

Here's some benchmarks:

CPU model:  Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz
Number of cores: 1
CPU frequency:  3699.893 MHz
Total amount of RAM: 128 MB
Total amount of swap:  MB
System uptime:   2 days, 3:21,       
I/O speed:  47.7 MB/s
Bzip 25MB: 5.63s
Download 100MB file: 90.1MB/s

For running Iodine, this will be perfect! They also allow you to use TUN/TAP and PPP which is great if you'd like to use it for Iodine or VPN.

Reviewing 2 WISHOSTING VPS servers

- Posted in VPS by with comments

I will be looking at a couple of VPS services from a company called WISHOSTING.

The first package I'll be looking at is the "KVM Storage CA" which offers the following specs:

  • KVM virtualization
  • 1 vCPU core Xeon D-1520
  • Unlimited CPU core 2.4GHz
  • 1GB RAM
  • 1800GB HDD RAID-5
  • Linux/Windows OS
  • Bandwidth 500Mbps
  • Unmetered Traffic
  • 1 IPv4
  • DDoS protection
  • Location - Canada
  • Setup time up to 24 hours
  • $8.99/month

WOW! That's my first impression. 1.8TB of space, unmetered traffic and a single core that can be maxed at 100% without issues.

I made an order and within an hour I had an email from them with my login details!

This is hopefully going to be my nextCloud, Plex and backup server.

Here's the output of vpsbench:

CPU model:  Intel Core Processor (Skylake)
Number of cores: 1
CPU frequency:  2399.998 MHz
Total amount of RAM: 990 MB
Total amount of swap:  MB
System uptime:   2 days, 15:14,       
I/O speed:  64.8 MB/s
Bzip 25MB: 12.17s
Download 100MB file: 96.9MB/s
CPU model:  Intel Core Processor (Skylake)
Number of cores: 1
CPU frequency:  2399.998 MHz
Total amount of RAM: 988 MB
Total amount of swap:  MB
System uptime:   18:38,       
I/O speed:  358 MB/s
Bzip 25MB: 9.40s
Download 100MB file: 87.6MB/s

As you can see, this runs quite well considering the price and the single CPU core.

I am able to transcode with 1 1080 movie with Plex with no skipping or any issues at all, however that was when there was absolutely nothing else going on. Opening webmin, for example, would cause it to skip.

I have to admit, at times, there are some issues like SSH inexplicably having a broken pipe, or taking forever to load system services, but depending on what you need that might not even be a concern. It is a VPS - a shared resource, after all.

The 1.8TB storage is an amazing amount of space for a VPS and it's perfect for what I'm using it for! In fact, this has to be the cheapest storage KVM VPS on the market!

The support team are very professional and my request to mount a custom ISO (Ubuntu Server 17.04) was quickly answered and even provided instructions on what to do.

After no time I was using the VNC viewer to install the OS and set it up.

I am extremely impressed with this service and would highly recommend it to anyone who has a similar requirement.

They also have virtual dedicated servers which I will probably end up using, including one that is $17.99/month for a 4 core i5 with 15GB of RAM and a 1.8TB HDD also, for twice the price of the current VPS for 3 extra cores and 14GB RAM extra it's extremely tempting!

They also have this cheap little OpenVZ NAT VPS which I really wanted to play with, as I've never used a NAT VPS before. Here's the offer:

  • 1 vCPU core
  • 256MB RAM
  • 256MB Swap
  • 40GB HDD
  • Unmetered bandwidth 250Mbps
  • IPv4 NAT
  • 1 VM per account
  • Blocked by China GFW
  • DDoS protection
  • Location - France
  • Setup time up to 24 hours
  • $2.99/year

That's right, $2.99 per year! For 40GB storage that's incredible! It's an OpenVZ VPS and you are provided with 20 forwarded ports including SSH.

Here's a vpsbench:

CPU model:  Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz
Number of cores: 1
CPU frequency:  3700.245 MHz
Total amount of RAM: 256 MB
Total amount of swap:  MB
System uptime:   9:16,       
I/O speed:  392 MB/s
Bzip 25MB: 3.64s
Download 100MB file: 78.7MB/s

3.7GHZ! that's impressive, check out the I/O and Bzip time! This is an extremely good deal for $2.99 per year!

Again, this one was set up in less than an hour, with a lot of instructions provided to setting it up and using it.

I really wish I could find a good use for this one, it's quite a large amount of storage considering the price!

I honestly believe that WISHOSTING provide some very good services, and their customer support is extremely helpful and they know their stuff!

I couldn't recommend these guys enough!

Today, I will be setting up an Iodine DNS Tunnel to bypass captive portals in order to gain access to the internet. This works on mobile phones as well as Linux computers.

This tutorial will focus on using a mobile phone to gain free internet by tunnelling data through a DNS server. The main point here to note is that this is not a fast connection, it's somewhere between 56kbits to 128kbits depending on latency to your server. I have about 30ms to my server and the speed is around 64kbits solid. It's great for accessing websites, SSH, etc without any internet data.

First, we need a subdomain from http://freedns.afraid.org - my example here is dah85.mooo.com

Second thing we need is a server or VPS with a public IP, and with TUN/TAP enabled. If you don't have that enabled, you'll get an error to remind you. Chances are it is, if not, enable it in your VPS control panel.

On your subdomain, add the NS record to be the same as your subdomain, in my case NS dah85.mooo.com. Also, add an A record to point to the IP of your server.

Once that's done, install Iodine on your VPS:

apt install iodine

Now, we need to set up networking.

echo 1 > /proc/sys/net/ipv4/ip_forward

echo "net.ipv4.ip_forward=1" > /etc/sysctl.d/60-ipv4-forward.conf

iptables -t nat -A POSTROUTING -o venet0 -j MASQUERADE

iptables -t filter -A FORWARD -i venet0 -o dns0 -m state --state RELATED,ESTABLISHED -j ACCEPT

iptables -t filter -A FORWARD -i dns0 -o venet0 -j ACCEPT

iptables-save > /etc/iptables.rules

You may need to replace venet0 with eth0, depending on your setup. If you're not sure, check with ifconfig.

Now, we need to start the Iodine server:

iodined -f -c -m 1280 -DDDDD -P topsecret 10.0.1.1 dah85.mooo.com &

Replace topsecret with a password you'd like to use, and replace dah85.mooo.com with your subdomain you're using.

Now that's done, we need to install andiodine client on your Android phone. You can get it from https://f-droid.org/packages/org.xapek.andiodine/

Once that's done, we can set it up like this:

Name: dah85.mooo.com Tunnel Topdomain: dah85.mooo.com Password: topsecret

Leave the rest as the default.

Now, connect to it and you should have a DNS tunnel working. All traffic on your phone is going through the tunnel :)

I have tested this, and confirmed that it works on the following: Telstra, Vodafone and Optus mobile phone networks in Australia. I found the SIM card doesn't even need to be registered or activated, which is a bit concerning. Basically, if you're able to access the carrier's website without credit, this will work.

Let me know in the comments how you go and if you need clarification :) I actually typed up a much longer and more in depth post but HTMLy doesn't autosave and I accidentally lost the lot and had to start again! I will go back and fill in more details later.