Skip to content

Updated my pfSense for LAN-parties

Update to my previous post https://summeli.com/11741/

I added a new WAN port for my pfSensebox. Now we can have a mobile 4G connection shared into LAN from all three Finnish networks (DNA, Telia, Elisa). This is pretty rad.

 

 

Routing multi-WAN in pfSense

I just added a third WAN connection into my pfSensebox for  LAN parties. However the configuration was pretty tricky and I forgot most of the settings, so I wrote this quick guide to follow for the future (if I have to do it again..)

Configure WANs

The fist step is to configure WANs. Just configure DHCP and internetsettings separably to each WAN.

Create Routing Gateways

Go to System->Routing->Gateway Groups, and add new

Continue reading ‘Routing multi-WAN in pfSense’ »

Building a router for LAN party with pfSense and Steam cache

We have small LAN-party for about 30 people twice a year. The party takes a place far away from good internet connections. We have to manage with only 4G connections in here. Currently it get really troublesome if we get some game updates to steam etc. since we’re only having one 4G connection witch is shared with 30 people.

Hardware Dell R210-II

After lurking a while in the reddit/r/homelab I decided to buy a cheap Dell R210-II from ebay. The reasoning was;

  1. The physical size is decent (I have limited storage space).
  2. The CPU has a support for virtualization.
  3. Dell provides the customized esxi images, so the installation should be easy
  4. 1 PCI-express slot for new NIC, and enough space to run 2 HDDs in RAID-mode.

I also purchased a 1gigabit 4 port Intel NIC from ebay. Those things are also really cheap. They might be Chinese pirate-cards? (the price is incredibly low), but they still do the work.

Network Configuration


Continue reading ‘Building a router for LAN party with pfSense and Steam cache’ »

Ordering tables with jquery

Last spring I was organizing official Finnish ice climbing championships www.finice.com . We were a really small team behind this production. The problem for us was how to deliver real time results to the audience, and for the media broadcast company, which was filming and commenting the competition.
I wrote a small script to order the results, which I just quickly entered to the html page during the competition.

function sortTable(table_id, sortColumn){
    var tableData = document.getElementById(table_id).getElementsByTagName('tbody').item(0);
    var rowData = tableData.getElementsByTagName('tr');
    for(var i = 0; i < rowData.length - 1; i++){
        for(var j = 0; j < rowData.length - (i + 1); j++){
            if(Number(rowData.item(j).getElementsByTagName('td').item(sortColumn).innerHTML.replace(/[^0-9\\.]+/g, '')) < Number(rowData.item(j+1).getElementsByTagName('td').item(sortColumn).innerHTML.replace(/[^0-9\\.]+/g, ''))){
                tableData.insertBefore(rowData.item(j+1),rowData.item(j));
            }
        }
    }
    tableData = document.getElementById(table_id).getElementsByTagName('tbody').item(0);
    rowData = tableData.getElementsByTagName('tr');
    for(var i = 0; i <= rowData.length - 1; i++){
        //console.log(rowData.item(i).getElementsByTagName('td').item(0));
        rowData.item(i).getElementsByTagName('td').item(0).innerHTML = i+1;
    }
}

Continue reading ‘Ordering tables with jquery’ »

OpenSSL s_client recipes

This post is pretty much a reminder note to myself how to quickly start debugging certificate errors. I have googled this stuff way too often.
Checking the certification expiration date:

openssl s_client -connect www.google.com:443 | openssl x509 -text

You could also add -servername parameter to support new ssl spec

 openssl s_client -servername google.com -connect www.google.com:443 | openssl x509 -text 

Then see these blocks

Validity
Not Before: Mar 22 00:00:00 2016 GMT
Not After : Mar 23 23:59:59 2017 GMT

Let’s verify the whole certificate chain:

openssl s_client -showcerts -connect www.google.com:443

This is the most common case for me. Most of the time the certificate is somehow installed in a wrong way. One common error is that the certificates are sent to the client in wrong order. This is fine for most of the clients, but at least Android seems to be expecting correct certificate order, as specified in the RFC document.
After this we can make simple GET request to the host with

GET /myresource.html HTTP/1.1
Host: www.google.com

After this remember to press the enter twice.

Free backups to dropbox from wordpress sites

I have WordPress based sites that I maintain. I haven’t been updating this blog for a while now. Hopefully I’ll get something neat done during this year.
Here’s an easy way to take backups from WordPress blogs a zip archive to the Dropbox.
1. I downloaded the BackUpWordPress plugin to create zip-archives from my blog. It creates a zip file from all the blog database and from all content.
2. I upload the zip file to the Dropbox with WPB2D plugin. I have chosen only the wp-content/backupwordpress-xxx folder, so it will only upload the zip files that I have just created with the BackUpWordPress plugin.

All my old apps for Nokia platforms can now be found from Opera AppStore

The Ovi store closed down more than a month ago. I migrated to the opera appstore, and updated the link to poin to the Opera store instead of Ovi.
Anyway, Here’s the new Badges for my apps
AntSnes for Symbian:
Opera Mobile Store
MeBoy Lite for S40:
Opera Mobile Store

Why is my GPU freezing

I bought a new gpu, AMD’s r9 290x. I was a bit surprised after first day since it seemed to be freezing some times. It could run just perfectly for few hours and then *boom*, it freezes. I googled the issue a bit and the most common explanations were Power issues and driver problems. I borrowed a new PSU from a friend, and it was still freezing. Reinstalled the drivers couple of times etc.
After couple of days I was certain that I had a broken GPU. I was also thinking that I have return it and get a new one from the warranty. However leaving an odd error description like “freezes after few hours” might just do nothing, since the maintenance clerk can always say “it works fine in here”.
I decided that I have to know what’s wrong with the GPU, so I can easily prove that the GPU is broken. I would need something like memtest86 for GPUs. MemtestCL does just that. I just download MemtestCL, and I got memory errors from my GPU. This could have saved so many hours of meaningless debugging! I also left a warranty claim that the memory is broken and you can easily see it by yourself with memtestCL. I got a new GPU the following day!
Note to self; If I ever have freezing problems with GPU, see if the memory is working with MemtestCL.
Oh, And remember to use the most current version of MemtestCL found from github: https://github.com/ihaque/memtestCL

Viskisieppo Chrome plugin to bypass glenmorangie.com site restriction to Finland

Finnish alcohol politics are like DRM. It has no effective on the abusive users, but it pisses off everyone else. Currently it seems that Whisky site glenmorangie.com is blocking Finnish users due to Finland’s alcohol laws.
Information want’s to be free, so I made a simple plugin for Chrome to bypass the country block at glenmoorangie.com.

Download

You can download the plugin from Chrome marketplace: https://chrome.google.com/webstore/detail/viskisieppo/dgmcbnhfgeejfapefklhjpilfiholhcc?hl=fi

How it works

You can download the whole project from my github page: https://github.com/Summeli/Viskisieppo
The plugin basically add, or edits the “X-Forwarded-for” HTTP-headers to make the requests look like they are not coming from Finland. This is basically implemented with Chrome webrequest-API

var requestFilter = {
	urls: [
		"*://*/*"
	]
};
chrome.webRequest.onBeforeSendHeaders.addListener(function(details) {
	var headers = details.requestHeaders;
	var header_set = false;
	for(var i = 0, l = headers.length; i < l; ++i) {
		if( headers[i].name == "X-Forwarded-for" ) {
			headers[i].value = "12.13.14.15";
			header_set = true;
			break;
		}
	}
	if(!header_set){
		headers.push({name:"X-Forwarded-for",value:"12.13.14.15"});
	}
	return {requestHeaders: headers};
}, requestFilter, ['requestHeaders','blocking']);

JamendoFM is now featured at Firefox Marketplace

JamendoFM is now on the list of featured music apps at Firefox Marketplace. It’s really nice to see that at least I had some success with this app, after porting it to Tizen, FirefoxOS and Android.
You can download the JamendoFM for

..maybe I could do one more client for Samsung smart tvs.
FirefoxFeatured