Free computing ebooks related to Linux, BSD and science

The Free Technology Academy is an organisation made up of several educational institutions from various countries that aims to contribute to a society that permits all users to study, participate and build upon existing knowledge without restrictions, software used in the Free Technology Academy virtual campus is free software built upon an open standards framework.

  • Linux from Scratch: A free open source ebook that will teach you how to build your own custom Linux distribution entirely from source code
  • WikiBooks: Wikibooks contains all kind of science and computing books available for free online, they can be edited but unlike the others, Wikibooks does not seem to have a PDF download option.
  • FreeTechBooks:  A website full of free downloadable tech ebooks related to computer science, engineering and programming, text books and lecture notes, all of the ebooks have been legally released to the Internet community, check out the open source books in their FreeBSD section.

The Free Technology Academy is financially supported by the Life Long Learning programme (LLP) of the European Commission, you can download free Linux and open source related eBooks from their materials webpage, these books are released under the Creative Commons license, it is likely that new ebooks will be added to their course materials.

 

Linux computer hacker
Linux computer hacker

Some of the books available for download from the Free Technology Academy include “Introduction to free software“, “Gnu/Linux advanced administration“, “Gnu/Linux Basic“, “Introduction to software development” and many others.

Open source Linux firmware router: DD-WRT, Tomato and OpenWRT

DD-WRT firmware: One of the biggest advantages of DD-WRT firmware router is the huge community behind it which makes it easier to get help. Open source DD-WRT firmware is free for individuals but if you want to use it for commercial purposes need to pay a license. DD-WRT has a multilingual interface, bandwidth management, it supports over 200 devices, all WLAN standards  and it has VPN integration.

DD-WRT Linux router firmware
DD-WRT Linux router firmware

OpenWRT firmware: OpenWRT is a Linux distribution normally used at embedded device, OpenWRT offers many features not previously found in consumer level routers. There is support for DHCP, and wireless encryption in between many others. Open WRT allows for package management allowing users to install new software according to their needs.

OpenWRT Linux router interface
OpenWRT Linux router interface

Tomato firmware: This open source Linux core firmware distribution is used mostly for Broadcom chipset based wireless routers, it features an easy to use Ajax based GUI interface, bandwidth usage monitor, advanced access restrictions, wireless features, P2P connections bandwidth control, running of custom scripts, scheduling of reboots and much more.

Tomato firmware Linux router
Tomato firmware Linux router

WARNING: Flashing hardware firmware is dangerous and installing third-party firmware is normally unsupported by router manufacturers. Use it at your own risk!

How to stop WordPress hotlinking using .htaccess

There are some spammers, mainly in the adult business, who take some of the highest ranked Google images and then hotlink to them in order to get your website traffic,if you have limited hosting account bandwidth or you do not want anyone to hotlink to any of your WordPress images, here is what to do to stop it.

Go to your webhosting account and edit your .htaccess file (create it if it does’nt exist),  add these lines (RewriteEngine will typically be already set to on if you have a WordPress blog, you will then omit this line, do not write it twice):

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ http://www.privacydusk.com/wp-content/uploads/2011/10/Stop-hotlink-warning.jpg [NC,R,L]

That is it! The most important part is to get yourdomain.com right, if you do not do this you will see the nasty image (stop hotlinking) served by anything you specified.

To whitelist search engines, or a site you own, and let them hotlink to your images, you should add these lines to your .htaccess file:

RewriteCond %{HTTP_REFERER} !^$

Stop hotlinking warning message
Stop hotlinking warning message

RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.de [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.nl [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.co.uk [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.es [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.ca [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?bing.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?bing.co.uk [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?bing.de [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?bing.ca [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yahoo.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yahoo.ca [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yahoo.de [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yahoo.co.uk [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?ask.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$  http://www.privacydusk.com/wp-content/uploads/2011/10/Stop-hotlink-warning.jpg [NC,R,L]

Stop hotlinking .htaccess code explained

RewriteCond %{HTTP_REFERER} !^$ > Allow blank referrers (recommended). Some users surf under firewall and they do not provide any referrers, disallowing blank referrers will block them from accessing these images, but if you still want to do that simply delete this line.

RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC] > Site allowed to link your images, if you do not add your domain here you will be blocking your own blog from displaying the images, you can add Google and Bing here so that they can still link to the images.

RewriteRule \.(jpg|jpeg|png|gif)$ http://www.privacydusk.com/wp-content/uploads/2011/10/Stop-hotlink-warning.jpg [NC,R,L]  > In between the () are type of files you want to block from hotlinking, you can also add .css and other extensions like .bmp. To add more seperate them with”|”.

Change ‘ http://www.privacydusk.com/wp-content/uploads/2011/10/Stop-hotlink-warning.jpg [NC,R,L] ‘ to your own message, whenever image hotlinking is detected this image will show up. It will be better if you host the image somewhere else outside from your own webhost. 

Warning: Make sure the image you are serving is not hotlink protected or your server can go into an endless loop.

Other ways to protect image hotlinking

You can turn on hotlink protection at your CPanel webhosting account, to use cPanel to stop image hotlinking go to the “Security” section and choose > Hotlink protection, you will have to enable it first and then enter the redirect URL you want hotlinkers to go to.

There is a WordPress plugin to display the image of your choice in hotlinked photos: WP-PICShield

To test if  hotlink protection is working on your site visit this online hotlink checker 

How to block a whole country from visiting your website

There are times when you may want to ban visitors from a certain country from viewing your website, the reasons for these can go from geolocation restricted content, to stopping malicious hackers.

You can block people from viewing your website using rules in your firewall IP tables but if you don’t have access to that, you can edit the .htaccess file and add a list of IPs to be blocked, you can get the whole IP range from a country from IPInfoDB.

However this solution may cause server overload if many requests are made from that country, resulting in a denial of service side effect, an easier way to do this, is by banning people from accessing your website according to their browser language settings, for example to ban people who is using a Chinese internet browser you will add to your .htaccess file:

RewriteCond %{HTTP_ACCEPT_LANGUAGE} zh-CN

RewriteRule .* – [F]

This will generate a 403 error message with Chinese browser configured visitors getting a “Forbidden” message when visiting your page, the language settings can be changed to any language you like,  zh-CN is the browser language settings for Chinese.

Video: How to use Mixmaster to send anonymous emails

Mixmaster is is an anonymous remailer software, tt encrypts your email messages before sending them and routes the messages through a series of anonymous proxies, you can choose how many nodes and what proxies you want on the chain, blacklisting a particular remailer server if you don’t trust it, mixmaster also provides protection against traffic analysis by delaying the sending of the messages.

This Linux Journal video introduces Mixmaster and explains how you can download it to your own Unix machine and help the Internet anonymity cause running an anonymous email server.

Mixmaster runs on *BSD, Linux and Microsoft Windows. If you have questions about remailers and Mixmaster one of the best points of calls is the newsgroup: alt.privacy.anon.server

You can read the mailing list for remailer operators, and subscribe, at: http://lists.mixmin.net/mailman/listinfo/remops

Mixmaster remailer software homepage: http://mixmaster.sourceforge.net/

How to change Lynx browser colours

Lynx browser colouring will only be possible if it has been built with colour style support, if you need to change your Lynx browser defaults colours you will have to edit: Line 2905 of /etc/lynx.cfg that is where the appearance values start, all you have to do to change Lynx colours is to uncomment the lines you will see there.

Linux Solarize colour scheme
Linux Solarize colour scheme

Changing the colour settings in lynx.cfg will not get rid of the black background, which can be hard to read when working in a shell through SSH, to get rid of the black background edit the file named /etc/lynx.lss and eliminate the following lines: # If you really want the terminal’s default colors, and if lynx is built using # ncurses’ default-color support, remove these two lines: normal: normal: lightgray:black To find out Lynx style sheet location check out LYNX_LSS environment variable.

Lynx browser useful links