Why iQ Block Country was no longer on the WordPress site

By on 21 februari in Tech | 29 comments

As you may or may not have noticed the folks from have removed the iQ Block Country plugin from their plugin directory. Here is the explanation why: The iQ Block Country plugin relies heavily o:  the MaxMind databases. These databases are distributed under the Creative Commons Atribution-ShareAlike 3.0 license while WordPress itself is licensed under the GPL license. And these 2 licenses conflict with each other. Therefor WordPress requires the iQ Block Country plugin to not automatically download the Maxmind databases or allow users to do so with for instance a download button. You as the end user should download the Maxmind databases manually and upload this file to the WordPress directory via FTP or similar ways. But there is a catch to this. The iQ Block Country plugin should work even without you uploading the necessary databases the plugin needs. So even if I build a version that does not download the databases there is a good chance the plugin will be removed again as it requires the same databases that I am not allowed to require. So despite it is logical that the two licenses conflict I am now at contemplating what I should do with the development of this plugin. There are a couple of options that I can think of now: Remove the automatic download from the plugin and put it back up with good instructions on how you can upload the databases. But this includes the risk the plugin may be removed again due to requiring things it is not allowed to require. Add another GPL compatible database (if any exist) next to the one that Maxmind provides making it so that the plugin does not rely on the Maxmind database. Create an API that checks the IP to a central server if the Maxmind database does not exist. This however relies on me having server capacity to run the API that I currently do not have (I would require a sponsor to donate such resources) Stop with the development. The latest version can still be downloaded here. What are your thoughts on this matter? Please leave a comment! Update 06 March: The plugin is available on the WordPress plugin website again. Share this:Share op Facebook (Opent in een nieuw venster)Klik om op Google+ te delen (Opent in een nieuw venster)Klik om te delen via Twitter (Opent in een nieuw venster)Klik om op LinkedIn te delen. (Opent in een nieuw...

iQ Block Country, the wordpress plugin that blocks countries for you.

By on 28 december in Tech | 182 comments

iQ Block Country is a WordPress plugin that allows you to block visitors based on from which country they are from or which IP address they are from. This plugin is tested up to WordPress 4.1.1, there are no guarantees that this version will work on (much) older versions. However if you run into problems with an older version of WordPress do not hesitate to contact me. In fact if you run into problems, have issues, have questions or just any comment at all just leave them in the comment fields or contact me via mail or the contact form. Latest version: 1.1.20 If you would like to contribute or donate to this plugin please visit this page. Description If you want to block people from certain (obscure) countries that have no business visiting your blog and perhaps only leave spam comments or other harmful actions than this is the plugin for you. Choose which countries you want to ban from visiting your blog. Any visitors from that country get a HTTP/403 error with the standard message “Forbidden – Users from your country are not permitted to browse this site.” The message is customizable an can be styled with CSS. If you only want to block other countries from visiting your backend (administrator) website than this plugin is also something for you. If you want to block users from both your frontend website as well as your backend website than this plugin is really something for you! Users that are blocked will not be able to do harmful things to your blog like post comment spam. You can block all visitors from a certain country accessing your site but you can also limit access to some pages, or some blog categories. This plugin uses the GeoLite database from Maxmind. It has a 99.5% accuracy so that is pretty good for a free database. If you need higher accuracy you can buy a license from MaxMind directly. If you cannot or do not want to download the GeoIP database from Maxmind you can use the GeoIP API website available on If you want to use the GeoLite database from Maxmind you will have to download the GeoIP database from MaxMind directly and upload it to your site. The WordPress license does not allow this plugin to download the MaxMind Geo database for you. Installation 1. Unzip the archive and put the `iq-block-country` folder into your plugins folder (/wp-content/plugins/). 2. Download the IPv4 database from: 3. Unzip the GeoIP database and upload it to your upload dir usually /wp-content/uploads/GeoIP.dat 4. Download the IPv6 database if you have a website running on IPv6 from: 5. Unzip the GeoIP database and upload it to your upload dir usually /wp-content/uploads/GeoIPv6.dat 6. If you do not want to or cannot download the MaxMind GeoIP database you can use the GeoIP API. 7. Activate the plugin through the ‘Plugins’ menu in WordPress 8. Go to the settings page and choose which countries you want to ban. Use the ctrl key to select multiple countries Frequently Asked Questions = Why is the GeoLite database not downloaded anymore ? = The WordPress guys have contacted me that the license of the MaxMind GeoLite database and the WordPress license conflicted. So it was no longer allowed to include the GeoLite database or provide an automatic download or download button. Instead users should download the database themselves and upload them to the website. WordPress could be held liable for any license issue. So that is why the auto download en update was removed from this plugin. = How come that I still see visitors from countries that I blocked in Statpress or other statistics software? = It’s true that you might see hits from countries that you have blocked in your statistics software. That is the way it works, certain plugins may be run before iQ Block Country is run so it may log visitors to pages. This however does not mean this plugin does not work, it just means somebody tried to access a certain page or pages and that that fact is logged. If you are worried this plugin does not work you could try to block your own country or your own ip address and afterwards visit your frontend website and see if it actually works. Also if you have access to the logfiles of the webserver that hosts your website you can see that these visitors are actually denied with a HTTP error 403. = This plugin does not work, I blocked a country and still see visitors! = Well, this plugin does in fact work but is limited to the data MaxMind provides. Also in your statistics software or logfiles you probably will see log entries from countries that you have blocked. See the “How come I still see visitors…” FAQ for that. If you think you have a visitor from a country you have blocked lookup that specific IP address on the tools tab and see which country MaxMind thinks it is. If this is not the same country you may wish to block the country that MaxMind thinks it is. = Whoops I made a whoops and blocked my own country from visiting the backend. Now I cannot login… HELP! = I am afraid this can only be solved by editing your MySQL database,directly editing the rows in the wp_options...

You know you’re in love when you can’t fall asleep because reality is finally better than your dreams

By on 03 december in Fun | 0 comments

You know you’re in love when you can’t fall asleep because reality is finally better than your dreams.

Dr Seuss

AutoMysqlBackup: Warning: Using a password on the command line interface can be insecure.

By on 17 november in Tech | 9 comments

Since MySQL 5.6 AutoMysqlBackup comes back every day with an error mail containing the lines “Warning: Using a password on the command line interface can be insecure.” Since there is no update of AutoMysqlBackup yet I decided to give it a quick fix myself. On line 115 there is a line that says removeIO Add this after removeIO: # Remove annoying warning message since MySQL 5.6 if [[ -s "$log_errfile" ]]; then sedtmpfile="/tmp/$(basename $0).$$.tmp" grep -v "Warning: Using a password on the command line interface can be insecure." "$log_errfile" > $sedtmpfile mv $sedtmpfile $log_errfile fi And you will receive no more daily emails regarding that it is unsafe to use passwords on the command line. Share this:Share op Facebook (Opent in een nieuw venster)Klik om op Google+ te delen (Opent in een nieuw venster)Klik om te delen via Twitter (Opent in een nieuw venster)Klik om op LinkedIn te delen. (Opent in een nieuw...

New DIY NAS system

By on 27 juni in Tech | 1 comment

I am building myself a sparkling new DIY NAS server which stands for a Do it Yourself NAS. I was very satisfied with my previous NAS servers the Synology DS219 and the QNAP TS259-Pro. They have a fine performance and are very customizable with the qpkg and ipkg support they have. But I need more space and I really wanted to build a NAS server myself. A knew I would have to do without the great web gui’s both Synology and QNAP provide but I don’t mind much as I am a system administrator who knows the way on the commandline. Another benefit for me is that I would gain even more flexibility with what I wanted to do with the NAS. Parts: Case: I wanted a silent case with at least 6 * 3.5″ bays. Also a Mini-ITX mainboard needed to fit. It was a close call between the Fractal Design Array R2 Mini ITX NAS Case and the Lian Li PC-Q08B. Because of a lower price and better reviews the “Lian Li PC-Q08B” is an excellent choice. It is very quiet and a nice case to see. Motherboard: I needed a motherboard with at least 6 SATA-300 or 600 connectors and also which was Mini-ITX. So I want for the Zotac H67ITX-C-E which has the following specs: 1155, H67 , Mini-ITX, 2x DDR3, mini-PCIe, PCI-e, 4x SATA-300, 2x SATA-600, 0, RAID +1, 1, 5, 10, 1Gbps, 802.11n, eSATA, 8x USB 2.0, 4x USB 3.0, DP, DVI-I, HDMI, 8.1. Please note that this motherboard does not support the new IvyBridge Intel processors but only the SandyBridge processors. This is not very clear as it most sites it says it supports Intel i3, i5 and i7 processors without further specification! Processor: I wanted a powerful processor as I may also want to run virtual machines on this NAS server for various little projects. If you only wish to run a NAS plus some other light tasks you may as well go for a i3 or i5 processor. But as stated I want a powerful processor and the price difference between for instance the i5-2500k and the I7-2600 3.40GHZ Quad-core was limited and the i7-2600 has better virtualization support. Memory As I wanted to be able to run more than 1 virtual machine I went for 8 GB of memory. I went for the Corsair XMS3 8GB(2x4GB) DDR3 1333MHz CL9. Which is not too expensive and will work fine with my Zotac motherboard. CPU cooler I want my NAS to be as silent as possible so no stock cooler for me but the “Scythe Big Shuriken 2 Rev. B”! A large CPU fan that is very quiet. Please note however that the combination of this CPU cooler and the Zotac motherboard will make sure you cannot use the PCI-e slot anymore. Not a problem for me as the onboard GPU is enough for me. Power Supply Once again quiet is of importance with the power supply. And this Cooler Master Silent Pro M500 500W is very quiet. And it’s modulair setup is quite handy as you only need to have those cables that you really need. Harddrives Well the most expensive part of the NAS are the harddrives but also the most important. I have choosen the Western Digital Caviar Green WD20EARX 2TB drives. As I wanted 6 drives the 2.5TB drives where just a bit overpriced but I did need more space and wanted a RAID6 setup so I did need those 2 TB drives. I bought 6 of these. 5 for the RAID6 setup and one for installing the operating system on. Please note that for the operating system you don’t really need 2 TB. You can buy a smaller drive, or perhaps you already own a drive you would like to use. You can even use a SSD drive for the operating system. Operating system I wanted to install linux on this NAS server and as I already have many years of experience with Ubuntu and I really like Ubuntu I installed Ubuntu Server 12.04 LTS on this system. After installing Ubuntu on this system you need to make sure your drives are ready for the RAID6 volume. In my case sdb,sdc,sdd,sde,sdf needed to be partitioned and given the proper system id: fd  Linux raid autodetect Next up is creating the RAID6 volume: mdadm --verbose --create /dev/md0 --level 6 --chunk 64 --raid-devices 5 /dev/sd[b-f]1 With /dev/sd[b-f]1 I select all drives between /dev/sdb and sdf at once. And a chunk size of 64 seems to be the optimal chunk size for a large RAID6 volume. Building your newly created md0 array can take up to multiple hours.You can tune the following system options if you create a raid volume for the first time: echo 200000 > /proc/sys/dev/raid/speed_limit_min echo 16384 >/sys/block/md0/md/stripe_cache_size These two commands must really speed up your first sync of the raid array.  But they may not be the optimal settings once you are using your NAS as they might push your NAS Server to limit. With cat /proc/mdstat you may view the progress of creating the array. Next up create a filesystem on the newly created array: mkfs.ext4 -b 4096 -E stride=16,stripe-width=48 /dev/md0 Now you are good to go and start using your array and your NAS server! But ofcourse you need to install and configure things like Samba, NFS or iscsi if you want to...

Retrieve data from weather station

By on 18 juni in Tech | 4 comments

Earlier I wrote a blog post about connecting my TFA Nexus Pro to a QNAP or Synology NAS system in this article. In that article I explain how you can install a tool that works for most weather station based on the Hideki te923 chip like the TFA Nexus Pro, Mebus TE923, Irox pro, Honeywell TE923, MeteoScan Pro 923, Cresta 923 and perhaps others. Now one of the neat things to do is of course actually read data from your weatherstation and put it into a MySQL database. But you can also put them into a RRD archive with rrdtool so you can easily create graphs from them with for instance cactii. If you have not done so before please install MySQL and PHP on your NAS server. You can do this for instance on a QNAP or Synology server by logging onto the console with SSH and entering the following commands: ipkg update ipkg install mysql ipkg install php ipkg install php-mysql Next create the following database. You can do this from within the MySQL console or for instance with phpMyAdmin. create database weatherdata; Next create the table: use weatherdata; CREATE TABLE `weatherdata` ( `timestamp` int(11) NOT NULL, `localtemp` float NOT NULL, `humidity` float NOT NULL, `temp1` float NOT NULL, `humidity1` float NOT NULL, `temp2` float NOT NULL, `humidity2` float NOT NULL, `temp3` float NOT NULL, `humidity3` float NOT NULL, `temp4` float NOT NULL, `humidity4` float NOT NULL, `temp5` float NOT NULL, `humidity5` float NOT NULL, `pressure` float NOT NULL, `uv` int(11) NOT NULL, `forecast` tinyint(1) NOT NULL, `storm` tinyint(1) NOT NULL, `wd` float NOT NULL, `ws` float NOT NULL, `wg` float NOT NULL, `wc` float NOT NULL, `rc` float NOT NULL, UNIQUE KEY `timestamp` (`timestamp`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; Next make sure you have te923con placed in /opt/bin/ as explained in previous article: And finally put the following script on your server. Preferably in for instance /opt/bin/weatherdata.php: <?php exec("/opt/bin/te923con -i 0",$output); $weatherdata = spliti(":",$output[0]); $query = "INSERT INTO weatherdata VALUES("; foreach ($weatherdata as $value) { $query .= "$value,"; } $query = trim($query,","); $query .= ");"; $con = mysql_connect('localhost','DBUSER','DBPASSWORD'); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("weatherdata", $con); if (!mysql_query($query,$con)) { die('Error: ' . mysql_error()); } mysql_close($con); ?> Make sure you change DBUSER and DBPASSWORD to match your login credentials for MySQL! Next you can run this PHP script from your SSH console so the data is inserted in the MySQL database: /opt/bin/php /opt/bin/weatherdata.php If results are entered in the database you can add the script to the crontab: # m h dom m dow cmd */30 * * * * /opt/bin/php /opt/bin/weatherdata.php To run this script every 30 minutes. Please note that this is just an example of how you can save data from your weather station to a MySQL database. It is not some form of a WEB interface that makes pretty graphs and lets you see historical data. But one could create such a web gui with this data inserted in the MySQL database. Share this:Share op Facebook (Opent in een nieuw venster)Klik om op Google+ te delen (Opent in een nieuw venster)Klik om te delen via Twitter (Opent in een nieuw venster)Klik om op LinkedIn te delen. (Opent in een nieuw...

Disable Firefox 13 new tab preview

By on 10 juni in Tech | 1 comment

I love Firefox and I also love thunderbird but I do feel however Mozilla is overdoing it a bit lately. For instance I do not like the new ‘preview tab’. I didn’t like it in chrome and I don’t like they have added it to Firefox. My browser opens with a blank page and I also like new tabs to open with a blank page and not with some preview of websites that I often visit. I know I open facebook every now and then but if I want go to facebook I’ll type it in. Same for twitter, news sites and other websites I visit regularly. So how can I disable Firefox 13 new tab preview? Luckily everybody who does not like the new behaviour of Firefox can disable it: Type about:config in browser and press enter. Click on warning “I’ll be careful, I Promise” and type newtabpage in the search box Double click on browser.newtabpage.enabled preference to change the setting from True to False Share this:Share op Facebook (Opent in een nieuw venster)Klik om op Google+ te delen (Opent in een nieuw venster)Klik om te delen via Twitter (Opent in een nieuw venster)Klik om op LinkedIn te delen. (Opent in een nieuw...

Reis door de Verenigde Staten & Canada

By on 06 april in Travel | 0 comments

Veel reis organisaties bieden alleen een reis langs de meest populaire bestemmingen op korte afstand van elkaar in de Verenigde Staten en Canada. Maar omdat bijvoorbeeld Yellowstone niet direct op de route ligt laten veel reisorganisaties deze links liggen. Echter kun je bij een aantal reis organisaties ook je eigen reis samenstellen. Hierbij een suggestie hoe zo’n reis er uit zou kunnen zien: Plaats Nachten Beschrijving Seattle 1 Op de 1e dag vliegen we van Amsterdam naar Seattle. Indien u zich nog uitgerust voelt kunt u nadat u heeft ingecheckt in uw hotel nog downtown Seattle en bijvoorbeeld de space needle bezoeken. In dit programma kiezen we voor Seattle (en niet voor bijvoorbeeld Vancouver) omdat u bij de meeste verhuur maatschappijen geen dropoff kosten betaald voor uw huurauto als u de auto in een nabije staat terug brengt. Clearwater 1 Waarschijnlijk heeft u nog last van een jet-lag en wordt u dus vroeg wakker. Wij raden u aan om zodra u wakker bent te vertrekken vanuit Seattle en de zon opkomst mee te maken in dit prachtige landschap. Het is verstandig om niet de snelweg te volgen richting Vancouver maar een stuk af te snijden via de binnenwegen, naast dat dit sneller is rijdt u door een prachtig stukje landschap. In Clearwater kunt u Wells Gray Provincial Park Eventueel kunt U voordat u hierheen gaat ook nog een paar dagen extra doorbrengen op Vancouver Island Jasper 2 Voor u vertrekt richting Jasper kunt u nog een paar uur doorbrengen in Wells Gray Provincial Park Indien u bijtijds in Jasper bent raden wij u zeker nog aan om de weg naar Maligne Lake te rijden in de late middag, zeker als de zon er op staat. De volgende dag kunt u bijvoorbeeld besteden om te wandelen in Jasper National Park of een begin te maken met de Icefields Parkway (bijvoorbeeld de bezienswaardigheden aan de 93A). The Crossing 1 Vandaag verlaat u Jasper en gaat u naar The Crossing wat ongeveer halverwege Jasper en Banff ligt. U rijdt hierbij over de Icefields Parkway. Heeft u gisteren geen tijd gehad voor de bezienswaardigheden aan de 93A dan raden wij u zeker aan dit vandaag alsnog mee te pakken. Daarnaast komt u langs de Athabasca Gletsjer en haar bezoekerscentrum. Langs de weg kunt u verschillende uitzicht punten en andere mooie bezienswaardigheden vinden. De meest bezienswaardigheden liggen redelijk dichtbij de weg maar met een wandeling van bijvoorbeeld een uur kunt u nog veel meer moois zien. Banff 1 Vandaag rijdt u verder over de Icefields Parkway richting Banff National Park. Eventueel kunt u nog even terug rijden naar de Athabasca gletsjer, en u moet zeker even stoppen bij Peyto Lake wat een waar kleuren spektakel is, daarnaast vindt u langs de route ook Lake Louise. Yoho National Park is ook op rij afstand. Fairmont Hot Springs 2 Vandaag heeft u de keuze. U kunt vanuit Banff Kootenay National Park bezoeken door terug te rijden richting Lake Louise en de 93 te blijven volgen richting Radium Hot Springs. Maar u kunt ook kiezen voor Yoho National Park ook daar dient u voor terug te rijden richting Lake Louise en na Lake Louise de 1 te blijven volgen richting Field en Golden. Bij Golden kunt u vervolgens weer de 95 volgen richting Radium Hot Springs. Vanuit Fairmont Hotspring kunt u (nogmaals) Kootenay National Park bezoeken. Maar verblijft u in het Fairmont Hotsprings resort dan is het zeker de moeite waard om het even een dagje rustiger aan te doen en te relaxen in een van de bij het hotel horende hot springs Overigens kunt u de bronnen bij Fairmont Hot Springs ook los bezoeken, u dient dan een kaartje kopen. Hetzelfde geld voor Radium Hot Springs welke zich vlak voor de entree van Kootenay National Park bevinden. Whitefish 1 Vandaag steekt u de grens naar de Verenigde staten over en rijdt u richting Whitefish waar u zult overnachten om Glacier National Park en de Going to the Sun route te bezoeken. Eventueel kunt u nog reizen via Waterton National Park. Let wel op dat de grens overgang tussen Waterton National Park en Glacier National Park beperkt open is. Bozeman 1 Vandaag een reisdag van Whitefish in de richting van Yellowstone National Park. U overnacht in Bozeman. West Yellowstone 3 Vanaf Bozeman is het nog een kort stukje rijden naar de ingang van Yellowstone National Park. U kunt met gemak 3-4 dagen door brengen in Yellowstone National Park. Als u echt wil gaan hiken zelfs nog wel meer dagen. Maar 3 tot 4 dagen is toch zeker wel een minimum en zelfs dan ziet u nog niet alles. Veel mensen verblijven helaas korter waardoor ze bijvoorbeeld de wandeltocht in de richting van de Morning Glory (bij Old Faithful) niet maken. Let op dat Yellowstone hoog ligt en het regelmatig (erg) koud is het meenemen van warme kleding kan geen kwaad. Jackson Hole 1 Vanaf West Yellowstone rijdt u vandaag door Yellowstone National Park naar Grand Teton National Park. Als u geluk hebt ziet u zelfs nog beren die gewoon langs de weg. Salt Lake City 1 Vandaag weer een reisdag richting Salt Lake City, in de middag heeft u de tijd om downtown Salt Lake City in te gaan of een van de gebouwen van de Mormonen te bezoeken. U kunt eventueel ook hier uw reis beëindigen en vanaf Salt Lake City terug vliegen naar Amsterdam dit...

Pagina 1 van 812345...Minst recente »