dah85.com

*not* just another blog ;)

I've been using an IPTV service that works great during the day, but at night it skips and stutters and buffers like crazy. It turns out the reason for this is to do with routing.

In Australia - specifically on the NBN - peak hour is usually between 3PM and 10PM, roughly when school kids start getting home and people get home from work and start their Netflix binge watching etc.

Most (if not all?) IPTV providers tend to have their servers in Europe. It seems like Germany is a popular choice for this. I have a 100mbps (megabit per second) connection at home and during off-peak I can get around 300 kilobytes per second which is 0.3mbps (0.3 megabit per second) and during peak time this plummets down to around 50kb/sec (kilobytes per second) or 0.05mbps (megabits per second) and this makes IPTV unwatchable.

After testing different speed tests from different locations, I've realised that Australia has a pretty consistent connection to the USA, in particular LAX and Miami during off-peak and even during peak times. It got me thinking about using that to my advantage to help with my IPTV situation.

How I fixed it

I decided that the best approach here would be to set up a VPS in an ideal location, run a proxy server on it and point VLC to that proxy server.

The first thing I did was set up a cheap VPS in Los Angeles. I chose to use this one for $8/year.

For better results and to be able to select different locations or change IP etc, I would recommend setting up a cheap VPS resource pool. This one is $19/year and lets you create up to 2 VPS in 4 locations in the USA (LA, Miami, New York and Chicago.

Once I had that set up, the next thing I did was set up a tiny proxy server, aptly named Tinyproxy.

Setting up Tinyproxy

I am setting this up on a Ubuntu 16.04 VPS, if you are using another distro then replace apt with yum/etc:

sudo apt update
sudo apt install tinyproxy

Tinyproxy is now installed, but it needs to be configured.

sudo nano /etc/tinyproxy.conf

We need to change a couple of things. First, the port. It defaults to 8080 which is very predictable and likely to result in your server being used by someone else. Change it to a random high port number that you will remember:

# Port: Specify the port which tinyproxy will listen on.  Please note
# that should you choose to run on a port lower than 1024 you will need
# to start tinyproxy using root.
#
Port 8080

Secondly, by default, Tinyproxy is set to only allow access from the computer it's running on - not ideal in this case. Find the following lines and change it to look like this:

# Allow: Customization of authorization controls. If there are any
# access control keywords then the default action is to DENY. Otherwise,
# the default action is ALLOW.
#
# The order of the controls are important. All incoming connections are
# tested against the controls based on order.
#
#Allow 127.0.0.1
#Allow 192.168.0.0/16
#Allow 172.16.0.0/12
#Allow 10.0.0.0/8

Note I have placed a # in front of Allow 127.0.0.1. By doing this I have made it accept all connections. It would be better to set up a rule to allow only a certain range, but for simplicity's sake I am leaving it like this.

Now that we've configured Tinyproxy, we need to restart the VPS.

sudo reboot

When the VPS comes back online it's all ready to go and Tinyproxy is waiting for us to use it.

Configure VLC Player

Finally, we need to configure VLC player to use this proxy when playing the videos.

Go to Tools then Preferences and select the Input/Codecs tab. Right down the bottom you will see HTTP Proxy URL

Go ahead and put the IP of your VPS in there along with the port. For example 123.123.123.123:8080 making sure to replace the IP with your VPS IP and the port with the port you've chosen in the config file. Once that's in there, click Save.

Testing it

The moment of truth is upon us. Go ahead and try watching the IPTV stream that you usually have issues with, it's best to test it during off-peak time and as well as during peak time to be sure it's set up correctly.

And there we have it, we've got flawless* IPTV :)

*of course, other factors can come into play, but this will resolve issues related to routing.

A year later..

- Posted in VPS by with comments

It was a year ago when I started my journey into learning about VPS.

It all started when I came across lowendbox.com and found that there are some cheap VPS available. Before that, I knew you could get them from places that would charge an arm and a leg.

I originally had a server running at home, running Proxmox that was used for nextCloud and Plex Media Center and it was costing me around $30/month in electricity (the cost of electricity in Australia is stupid) and I quickly learned that I could offload this to "the cloud" (there really is no cloud, it's just a buzzword for someone else's computer!)

So, looking back at the start of my journey I have learned a lot. I have found the need to upgrade from a VPS to a dedicated server, which I found the amazing deal from SerweryDedyKowane.pl which now handles everything I need.

I still keep a few VPS for playing with, I don't really want everything to be running on my dedicated server for various reasons.

This blog, for instance, started off running on WootHosting's shared hosting for $1/year and now it's running on my dedicated server with absolutely zero downtime (except for when I restarted the server for security patches)

NextCloud and Plex run flawlessly and I'm very happy with the way it's all working.

I could still get away with using VPS instead a dedicated server for these tasks.

If I were to do that, with the hindsight that I now have, I'd recommend to myself to do this:

It's been a pretty fun learning experience, and I have certainly learned a lot by doing this. It's been also really awesome being able to share it with the world through this blog :)

Showing disk usage in Linux

- Posted in Quick Tip by with comments

If you are wondering what is taking up all the space on your Linux server or computer, then there is a simple, handy tool called ncdu which shows you exactly how much space is being used by each folder.

sudo apt install ncdu

Then if you want to view the entire computer:

cd /
ncdu

Or if you want to see which is the biggest folder in your Transmission download folder..

cd /var/lib/transmission-daemon/downloads
ncdu

To exit, press q.

Using a VPS as a proxy with SSH

- Posted in Quick Tip by with comments

Just a quick tip, if you want to use a VPS as a proxy server through SSH then use this command (if your computer runs Linux)

ssh -D 12345 [email protected]

Replace 12345 with the port you want to use.

Then in Firefox, go to Preferences and add localhost as a Socks 5 proxy and the port 12345

I always test it first by going to Google and searching "What's my IP" to make sure it shows as the VPS's IP.

And you're done.

Reviewing a $5/year VPS from AlphaRacks

- Posted in VPS by with comments

Today I was looking for the absolute cheapest VPS that I could possibly find that wasn't a NAT VPS - on other words, one that comes with a dedicated IP as opposed to a shared one.

I found this neat little VPS:

  • 10 GB HDD
  • 1 CPU (Xeon E5620)
  • 1 IPv4
  • 128MB RAM
  • 100mbit
  • 250GB Bandwidth
  • OpenVZ
  • $5/year

$5 per year barely covers the cost of an IP, let alone the rest of the specs you get!

I paid with Bitcoin, and it was set up instantly.

Here are some benchmarks:

CPU model:  Intel(R) Xeon(R) CPU           E5620  @ 2.40GHz
Number of cores: 1
CPU frequency:  2400.119 MHz
Total amount of RAM: 128 MB
Total amount of swap:  MB
System uptime:   5 min,       
I/O speed:  33.4 MB/s
Bzip 25MB: 10.42s
Download 100MB file: 11.3MB/s

Getting the full speed out of the network, the I/O is what you'd expect for $5/year.

CPU model:  Intel(R) Xeon(R) CPU           E5620  @ 2.40GHz
Number of cores: 1
CPU frequency:  2400.119 MHz
Total amount of RAM: 128 MB
Total amount of swap:  MB
System uptime:   18 min,       
I/O speed:  68.5 MB/s
Bzip 25MB: 11.15s
Download 100MB file: 11.1MB/s

Looks a little bit better in the IO department this time, network is consistent.

This would be perfect for running an Iodine DNS tunnel! It would also suit running as a VPN, an IRC bouncer, a small web server, even for playing with Linux for the first time.

128MB of RAM is the only real limitation on this VPS, but again, for the price it's hard to beat.

If you want one of these, click here :)

On one my test servers running VestaCP on an LXC container, I ran into an interesting issue where (due to the nature of LXC this is expected behaviour) the VestaCP LXC container shows the load of the host node, and as it's under load, VestaCP refuses to perform backups.

If you get an email like this "LoadAverage 5 is above threshold" and you would prefer to change that to something a bit higher (in my case, I'm changing it to 20 because I want it to backup even if the server is on fire) then here's how to do it.

We need to edit the BACKUP_LA_LIMIT=5 variable in /usr/local/vesta/func/main.sh

sudo nano /usr/local/vesta/func/main.sh

In my case I've changed it to read BACKUP_LA_LIMIT=20 so that it will always backup.

I searched high and low on the internet and couldn't find anything that suggested this, so I ended up doing a grep -r "BACKUP_LA_LIMIT" in the /usr/local/vesta directory to find which file is responsible.

I hope this can help someone else :)

Reviewing Wishosting's "KVM SSD Plus LA" VPS

- Posted in VPS by with comments

Here we are again, reviewing yet another VPS from Wishosting, this time its their "KVM SSD Plus LA" plan, which has the following specs:

  • 4 vCPU cores Intel Xeon E5-2650
  • Unlimited CPU cores 2.4GHz Turbo
  • 16GB ECC RAM
  • 80GB SSD
  • Linux/Windows OS
  • Bandwidth 250Mbps
  • Traffic 8TB
  • 1 IPv4
  • Private networking
  • Location - Los Angeles
  • Setup time up to 24 hours
  • Price: $15.99/month

What I love about Wishosting's VPS is they come with no limits on the CPU usage. You can run ANYTHING and make 100% usage of the resources advertised. I think other providers should do the same, they could learn something from Wishosting.

Apart from that, they have extremely friendly and helpful support - when I speak with Michael he's so damn professional in his ticket etiquette - again, other providers should take a page out of his book!

They use a system which is called OpenNebula which is a breath of fresh air after seeing so many SolusVM hosts. I really like the fact that you can basically treat a VPS as a resource pool. This one comes with 4 cores and 16GB of RAM plus 80GB SSD. I could split this into 4 VMs if I wanted to. It's nice to know those options exist.

Anyway, let's have a look at the performance of this KVM.

CPU model:  Intel Xeon E312xx (Sandy Bridge)
Number of cores: 4
CPU frequency:  1999.999 MHz
Total amount of RAM: 16051 MB
Total amount of swap:  MB
System uptime:   4 min,       
I/O speed:  275 MB/s
Bzip 25MB: 6.55s
Download 100MB file: 95.0MB/s

:) :) That I/O is nice, 6 second bzip is also nice. But 95MB/sec looks a lot like gigabit speeds to me, and it's only advertised as 250mbit!

CPU model:  Intel Xeon E312xx (Sandy Bridge)
Number of cores: 4
CPU frequency:  1999.999 MHz
Total amount of RAM: 16051 MB
Total amount of swap:  MB
System uptime:   6 min,       
I/O speed:  506 MB/s
Bzip 25MB: 7.79s
Download 100MB file: 103MB/s

Consistent as we can see here, the I/O jumped the second time round which is typical with these benchmarks.

Here's another "benchmark" you may be interested in:

[2018-02-28 12:02:54] speed 2.5s/60s/15m 126.4 133.3 n/a H/s max: 145.8 H/s
[2018-02-28 12:02:59] speed 2.5s/60s/15m 101.0 131.3 n/a H/s max: 145.8 H/s
[2018-02-28 12:03:04] speed 2.5s/60s/15m 89.6 129.4 n/a H/s max: 145.8 H/s
[2018-02-28 12:03:09] speed 2.5s/60s/15m 101.6 127.5 n/a H/s max: 145.8 H/s

I thought I'd run that for a minute to see what it's like, the CPU supports AES-NI and this is on 3 of the 4 cores :)

I've reviewed plenty of servers in the past, and a few from Wishosting, but this is the first Wishosting server I've had which is located in LA, which has great connectivity to Australia. I'm happy with the way this performs, I could probably easily justify keeping this server as a web server with the 80GB SSD it's insanely fast.

If you're looking for a speedy, beefy KVM with some kickass specs for a reasonable price, I'd recommend this package from Wishosting.

Cloud resource pools

- Posted in VPS by with comments

I thought I'd write up on cloud resource pools. Some VPS providers offer a pool of resources which you can use to make up multiple VPS for yourself, or to resell. They vary in shapes and sizes, but they're basically the same principle.

I've found that these are incredibly useful for spinning up a quick VPS for testing or playing around.

I'll be looking at one of the resource pools from WootHosting since they're cheap enough :)

The deal I'm looking at can be found here.

For $50/year you get the following:

  • 8 GB RAM
  • 200 GB RAID-10 Storage
  • 20TB Monthly Bandwidth
  • 1Gbps port
  • 6 IPv4 Addresses
  • 300 IPv6 Addresses
  • Deploy Instances in Los Angeles, Miami, New York, and Chicago
  • Create up to 6 VPS
  • Each VPS has 4 cores (not mentioned anywhere on their site)

We can create up to 6 VPS with this pool, or combine them into 1 massive VPS. We're given a control panel where we can add "users" and create VPS easily. Keep in mind that these are allowed to be resold too, and the control panel is white labelled, meaning there is no WootHosting branding or anything like that - nobody would know.

Today I'm going to focus only on setting up a single VPS with all of the resources combined, so we'd have a VPS with the following specs:

  • 4 CPU cores (Xeon E5620 @ 2.4ghz)
  • Set up in LA
  • 8GB RAM
  • 20TB Bandwidth (gigabit!)
  • 200GB HDD
  • 6 IPv4 addresses and 50 IPv6 (I'm not even going to use them I don't think, it's just for testing at this stage)

So now that I've built that, I'm going to do a benchmark:

CPU model:  Intel(R) Xeon(R) CPU E5620  @ 2.40GHz
Number of cores: 4
CPU frequency:  2127.973 MHz
Total amount of RAM: 8192 MB
System uptime:   26 min,       
I/O speed:  134 MB/s
Bzip 25MB: 16.54s
Download 100MB file: 99.55MB/s

We can see that the specs have combined, and it's pretty decent :) When you consider the low price, that's a high end VPS!

Since I now have this for a year, I'm going to try to find something for it to do. My thoughts so far consist of either:

  • Running a nice Plex server (LAX has the best connectivity to Australia)
  • Running a web server with VestaCP and making use of those extra IPs
  • 200GB of backups, but then the CPU and RAM go to waste.
  • I could mine on it until I decide (I like this idea, let's try that now..)

Curious to see what hashrate I get here..

Hmm, the CPU doesn't support AES-NI which means mining is not going to work too well, but I'm getting about 50h/sec.

Curiously, WootHosting have a rather large collection of servers in this pool, and I know from past experience that quite a few of their servers support AES-NI which is great!

That's one of the best things about these pools though, if you happen to get a bad IP or maybe a crowded server (let's face it, at this price it will be oversold and Woot are famous for overselling lol) then you can just destroy and create a new one until you get something awesome.

Anyway, I will play around some more with this and see how I go. In a previous article I wrote up about a MONSTER VPS which costs about $30/month and comes with a crazy amount of features. I'm probably not going to renew that, for that price I could get a dedi ;)

If you want to play around with one of these, the deal is here

If you have one and you have found something cool to do with it, please let me know in the comments below or email me dave at this website dot com :)

List of dirt cheap (<$20/year) VPS

- Posted in VPS by with comments

I have added a new section to this website, which lists dirt cheap VPS which are under $20 per year. All providers on that list I have personally used and tested.

Enjoy! :)

https://dah85.com/dirt-cheap-vps-list

A quick look at Alpharacks reseller hosting

- Posted in VPS by with comments

I'm going to have a quick look at an Alpharacks shared hosting reseller plan, as a follow up to my earlier post about their standard shared hosting for 99 cents per year.

Here's the details of the plan:

Reseller Starter Plan 15 GB Secure Disk Space 600 GB Monthly Bandwidth Shared IP Address Create Unlimited Sub-Accounts Create Shared Hosting Accounts cPanel/WHM Control Panel Softaculous Auto-Installer LiteSpeed Web Server Powered CloudLinux Optimized DDoS Protection Included Reseller Resources Tool Instantly Activated $6 per year ORDER NOW

$6/year is an excellent price, you basically get the same as what you'd get for 99 cents, except you can create cPanel sub-accounts to resell, or even to use for your own domains of course.

Basically I signed up for this just to confirm if it's on a different server to their 99 cent shared hosting, which it is not. It's hosted on the same server - their "latitude" server which I looked at in my last review.

TL;DR: It's great value, network is excellent, but the stats that cPanel report show ~20 load on 8 cores/threads and a 97% full disk. No noticable slowdowns or downtime.

I would recommend this over Woothosting's offers, if you need something semi-reliable. I'm not claiming it's a replacement for a $10+/month service from a bigger company, but for the price there's hardly any reason to complain :)