Choosing not to be tracked by Telenet

Itelenot-logo understand that company’s need to make money, but if they try to charge double for a single product,  that’s where I draw the line. Telenet (a network provider) wants to track both to what you look at on TV and internet use. Basically they collect your information and sell it of to advertisement company’s to target you with crappy  ads that are more focused on you, as if the premium price we pay Telenet is not enough for there investors…

Changing it is simple, yet hidden out (IMHO)

  1. Log in at mijn.telenet.be
  2. Go to “My privacy settings”  (Mijn privacy-instellingen)
  3. Select the “common” setting (Algemeen)
telenet_privacy

howto change Telenet privacy settings, to a more sensible setting.

Lets hope we get a more free kabel network soon. Cause they are abusing their power more and more.

Recursively md5/sha1/sha256/sha512 a directory with files

A quick hack for checking content is consistent over systems using a hashing method.  This is for md5, which is fast but some collision is possible if carefully crafted.  Use this on each directory.

find . -type f -exec md5sum "{}" + > checksum.list

Then checking if both are equal :

diff first.list second.list

No difference : data on both ends same. This also works with sha256sum.

Good luck!

Installing ZFS on Mint 17.3 live medium

So our ZFS server running Centos 7 has some problems, and we needed to verify that the data was oké, and for good measure sync our backup.  Getting ZFS on mint was surprisingly difficult, perhaps cause of my close to zero knowledge about Mint, or perhaps its hanging a bit in limbo right now … Allot of guides on how to get booted using ZFS, but little on just the installation on Mint and not on Ubuntu. I tried (and failed) to use the debian guide, the -native- Ubuntu ppa and even the Ubuntu . In the end I found it using scraps all over the net… weird, since I was under the impression Mint was a beginner-user-friendly distro … well I guess beginners can’t have ZFS. Here goes :

Installing the zfs-native seems the best option :

sudo add-apt-repository ppa:zfs-native/stable
sudo apt-get update

Note : some errors around CD-ROM can be ignored. (I think)

W: Failed to fetch cdrom://Linux Mint 17.3 _Rosa_ - Release amd64 20160105/dists/trusty/non-free/binary-i386/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs

Next you need to install build tools :

apt-get install build-essential

It doesn’t seem to have a dependency set on build-essentials, so do it in two steps ! Then finally install zfs … ubuntu-zfs :/

apt-get install spl-dkms zfs-dkms ubuntu-zfs

What was installed is not really clear to me, but I could find my ZFS again, after doing :

modprobe zfs

Finding the zpool can be done using :

zpool import

and to import the set : (dataet = pool name)

zpool import dataset

happy recovery 🙂

New project : divebug.com

Its been silent for a while, here, not withouth cause, I been working on a new project : divebug.com 
The idea is to have an “open” dive library, where users can add & modify dive locations and information divers must aquire. Its just starting out, and honistly the code is far from what I’d like, but atleast its moving forward. If you have feedback or a good idea, just drop me a line below!

divebug_logo_v2

Directory listing in Nginx

By default, Nginx doesn’t put directory listing on, in a development system that’s a really useful feature (many, many projects) so I tend to put it on. autoindex on;

In the server block under location :

server {
    location / {
        autoindex on;
    }
}

Worked like a charm !

autoindex in action, showing the directory listing

autoindex in action, showing the directory listing

 

PID file /run/nginx.pid not readable (yet?) after start

Aauch, after installing Nginx on a new machine Centos 7, I could not start it… for some weird error :

systemd: Starting nginx - high performance web server...
nginx: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: nginx: configuration file /etc/nginx/nginx.conf test is successful
systemd: PID file /run/nginx.pid not readable (yet?) after start.
systemd: nginx.service start operation timed out. Terminating.
systemd: Failed to start nginx - high performance web server.
systemd: Unit nginx.service entered failed state.
systemd: nginx.service failed.

The file did exist at /var/run/nginx.pid and was readable. The fix after some searching :

change /etc/nginx/nginx.conf :

from

pid        /var/run/nginx.pid;

to

pid        /run/nginx.pid;

and restart the service, that’s it ? yep, that’s it! BTW, check out this new service Amplify from Nginx!

Running Nginx on Bash for Windows 10

I normally go for Apache as my go-to webserver, lately however I got a liking to Nginx, for no real reasons except for the fact it has a nicer config layout. (a bad reason is a reason non the less) So when I installed Bash for Windows 10, I when and tried Nginx, sadly it didn’t work, and still doesn’t work nicely. I however got it running, this is how : First, install Nginx.

Then I wanted to ignite Nginx, but that did not work, starting Nginx failed cause of port 80 was in use.

2016/06/24 11:37:22 [emerg] 2710#0: bind() to 0.0.0.0:80 failed (98: Address already in use)

Since I am running two systems (Linux and Windows 10) there are plenty of places to look. I started with the location I know best and was most unlikely the problem : Linux.  Using netstat -tulpn | grep 80 I verified nothing was running on this freshly installed UbuntuBash. So onto W10, I know Skype, Apache, … uses port 80, but that did not run, so the hunt continued. I finally found -using resmon.exe– under Listener-port  the problem, port 80 was being used by System (PID 4) … not something you can easily kill …

PID 4 (Sytem) was listening on port 80. (no longer seen here)

PID 4 (Sytem) was listening on port 80. (no longer seen here)

I dug a bit further and found this useful post. You have to stop some service, this is done using :

  • windows key + x
  • select console (admin)
  • run net stop http
net stop http in Windows 10 (in dutch)

net stop http in Windows 10 (in dutch)

C:\WINDOWS\system32>net stop http
De volgende services zijn afhankelijk van de HTTP Service-service.
Als u de HTTP Service-service stopt, worden deze services eveneens gestopt.

   World Wide Web Publishing-service
   SSDP Discovery
   Print Spooler
   HomeGroup Provider
   Function Discovery Resource Publication
   Function Discovery Provider Host

Wilt u doorgaan met deze bewerking? (J/N) [N]: j
De World Wide Web Publishing-service-service wordt gestopt.
De World Wide Web Publishing-service-service is gestopt.

De SSDP Discovery-service wordt gestopt.
De SSDP Discovery-service is gestopt.

De Print Spooler-service wordt gestopt.
De Print Spooler-service is gestopt.

De HomeGroup Provider-service wordt gestopt.
De HomeGroup Provider-service is gestopt.

De Function Discovery Resource Publication-service wordt gestopt.
De Function Discovery Resource Publication-service is gestopt.

De Function Discovery Provider Host-service wordt gestopt.
De Function Discovery Provider Host-service is gestopt.


De HTTP Service-service is gestopt.

After that I retried nginx to once again be shown an error :

2806#0: ioctl(FIOASYNC) failed while spawning "worker process" (22: Invalid argument)

That was solved using this -still open- bugreport on github. The essence is add the following to /etc/nginx/nginx.conf :

master_process off;
#daemon off;

Now to be honest I have got no idea, what any of those parameters do.  (note) I tried w/o the daemon parameter and it works as well, so I only use master_process and everything seems to “work”. (different from the solution on github!)

After this, Nginx is running nicely on my BashOnWindows. Pretty nice work, Windows !

// update  28/06

On my second machine I also had to change /etc/nginx/sites-available/default the following line :

server {
        listen 80 default_server;
        listen [::]:80 default_server ipv6only=on;

to

server {
        listen 80 default_server;
        #listen [::]:80 default_server ipv6only=on;

This probably cause some ipv6 problem. (this is development only anyway!)

 

GPG error nginx signatures couldn’t be verified because the public key is not available: NO_PUBKEY ABF5BD827BD9BF62

A quickie before lunch :

GPG error: http://nginx.org lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ABF5BD827BD9BF62

Installing Nginx on my bash on windows 10 installation.  This is suprisingly very similar as on Ubuntu straight on bare metal, so the fix is the same :

In short :

wget http://nginx.org/packages/keys/nginx_signing.key
cat nginx_signing.key | sudo apt-key add - 
apt-get update
apt-get install nginx

live :

$ wget http://nginx.org/packages/keys/nginx_signing.key
--2016-06-24 11:36:25--  http://nginx.org/packages/keys/nginx_signing.key
Resolving nginx.org (nginx.org)... 2001:1af8:4060:a004:21::e3, 206.251.255.63, 95.211.80.227
Connecting to nginx.org (nginx.org)|2001:1af8:4060:a004:21::e3|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1561 (1.5K) [application/octet-stream]
Saving to: ‘nginx_signing.key’

100%[===========================================================================>] 1,561       --.-K/s   in 0s

2016-06-24 11:36:25 (18.4 MB/s) - ‘nginx_signing.key’ saved [1561/1561]

$ cat nginx_signing.key | sudo apt-key add -
OK

$ apt-get install nginx
Reading package lists... Donebs
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
 libssl0.9.8
The following NEW packages will be installed:
 libssl0.9.8 nginx
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,194 kB of archives.
After this operation, 3,576 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu/ trusty-updates/universe libssl0.9.8 amd64 0.9.8o-7ubuntu3.2.14.04.1 [692 kB]
Get:2 http://nginx.org/packages/ubuntu/ lucid/nginx nginx amd64 1.8.0-1~lucid [502 kB]
Fetched 1,194 kB in 0s (2,337 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libssl0.9.8:amd64.
(Reading database ... 26810 files and directories currently installed.)
Preparing to unpack .../libssl0.9.8_0.9.8o-7ubuntu3.2.14.04.1_amd64.deb ...
Unpacking libssl0.9.8:amd64 (0.9.8o-7ubuntu3.2.14.04.1) ...
Selecting previously unselected package nginx.
Preparing to unpack .../nginx_1.8.0-1~lucid_amd64.deb ...
----------------------------------------------------------------------

Thanks for using nginx!

Please find the official documentation for nginx here:
* http://nginx.org/en/docs/

Commercial subscriptions for nginx are available on:
* http://nginx.com/products/

----------------------------------------------------------------------
Unpacking nginx (1.8.0-1~lucid) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up libssl0.9.8:amd64 (0.9.8o-7ubuntu3.2.14.04.1) ...
Setting up nginx (1.8.0-1~lucid) ...
runlevel:/var/run/utmp: No such file or directory
invoke-rc.d: policy-rc.d denied execution of start.
Processing triggers for libc-bin (2.19-0ubuntu6.9) ...
Processing triggers for ureadahead (0.100.0-16) ...

 

Allow copy/paste in Bash for Windows 10

I have finally got to using bash (Ubuntu) for windows 10. I really like it, I like the possibility to run ALL the games I want and still be able to be productive. (ssh from bash, yeeey!) So I started off with moving some repo’s (git/svn/darcs) that worked great, but I noticed I could not copy-paste. I googled it (its a verb) and found this is pretty much default behavior for windows consoles, cause you know, windows consoles…

Anyway the workaround I found for Git for Windows also works for bash (Ubuntu) on Windows 10.  Since my computer is running in dutch (its really annoying) the screens are also in dutch, but its pretty self explaining.

  1. right click on the top bar –> select properties
  2.  select “Quick edit mode”,  now you can use the paste using right mouse …

Happy pasting! Under what category should I post this … Windows, Linux, Bash, … ooo Microsoft.

Setup auto upgrade on Centos 6/7

This is one of those things I do when I enter a new server/virtual machine. While this could cause issue’s down the road, (updates are always a bit of a guess) Most simple advice to give to problems in Linux is, “did you update ?”. In Centos its pretty easy to set this up automatic updates, so no server should be without this essential part of configuration. Another big point is security, while this isn’t per definition more secure, its better to have a bad update then to have a few 100 MB of not done updates cause they “might break something”.

1) “update”
Seems so logically, but still update everything before you let yum-cron loose.

yum update

2) Install the magic
Its as easy as pie.

yum install yum-cron

3) configure
Configuration file for Centos 6 is located /etc/sysconfig/yum-cron for Centos 7 its located at /etc/yum/yum-cron.conf (a more logically location) Go through the settings, and decide whats best for you, personally I leave most as-if, only changing (Centos7) :

apply_updates = yes

Since I want them installed nightly if available.

4) start the service & enable at reboot

# service yum-cron start
Redirecting to /bin/systemctl start  yum-cron.service
# chkconfig yum-cron on
Note: Forwarding request to 'systemctl enable yum-cron.service'.

Enjoy ! From now on, your machine will be up-to-date… no more lagging behind! If an error should happen cause of updates, you only have to look back a few days in :

/var/log/yum.log

Happy updating!