Tweets

lördag 9 juli 2011

Qnap, SSL-certificate and dynamic DNS

I have a qnap 219p which I sometimes need to access remotely and view the administration web interface. I have been avoiding this outside my lan since I haven't taken time to configure a secure connection. It was time to do something about this. I have been thinking of getting a router with vpn support, namely the MikroTik RB750GL, but wanted to give ssl  a shot. The precondition of using ssl to access my qnap outside the lan was that it should be working with dynamic dns.

A quick search revealed that a lot of people had problem getting this to work. It took me some time but I finally got it working. Here is my approach. Please feel free to comment about improvement in both approach and security, since this was mostly a "just-getting-it-to-work-solution".

I followed this a bit outdated guideline. I repeat the steps in case the link gets broken:

  1. download OpenSSL from here and install
  2. open cmd with administrative privileges (win 7) and navigate to <OpenSSL-install-dir>\bin
  3. generate private key: openssl genrsa -out priv.key 1024
  4. generate certificate: openssl req -new -key priv.key -out server.crt -x509 -days 365 (where x509 is the certificate format accepted by qnap and 365 is the number of days the certificate is valid and maybe the next time you read this post :P)
  5. copy all the value of each file to corresponding form in qnap > system administration > security > import ssl secure certificate and click upload
  6. when the upload is ready: download and open the certificate. Chose to install it and make sure you chose the certificate store: "trusted root certification authorities".

There was one thing more. Since ssl uses port 443 I needed open it in my dlink dir-655 and rout it to the ip of the qnap.


After this I was able to login using my dynamic dns link and port: <my-dyndns-link>:8080. Well, this port is my private, I use another one as my public and reroute it in my router and it is working just fine.

The certificate can be verified here http://www.digicert.com/help/ using only the dynamic dns link.

fredag 24 juni 2011

Flicking Windows 7!

Got me a Vaio computer about half a year ago. The problem, apart from all bloatware (where is Sony's "Fresh start"?), the Windows 7 had some issues with the super mega advanced key combo: alt+tab. Each time I used it the pop-up menu flickered. I didn't do much about it since I was using my still going strong old one for much of my daily work. But then...

Yesterday, al+tab on my desktop computer started flicker too. Each time... flicking Windows 7! I did some searching and found one here (thanks embram). The solution: righ-click on desktop > Personalize > Windows Classic > (wait for loading) > (back to?) Windows 7 Basic > (wait for loading) > done.

måndag 30 maj 2011

Missing calendar on ipad 2

I use several Google calendars to sync with work, family and for personal use of course. I check the calendars on my computer, phone and Ipad 2. Today I noticed that one of my calendars was not appearing on the Ipad, but visible on the computer and Nexus S. Why?

After some googling i found the solution here and the reason is that one of calendars was not checked on my Google account's synchronization settings page (https://www.google.com/calendar/iphoneselect?pli=1). Why was a checking missing for one of my calendars? I have no idea.

Edit: I managed to reproduce this problem
  1. create a new calendar on calendar.google.com
  2. open calendar app on Ipad, the new calendar is missing
  3. go to https://www.google.com/calendar/iphoneselect?pli=1, the new calendar is unchecked
So, new calendars are not synched to Ipad!
(My account type for calendar sync are set to Gmail on the ipad.)

söndag 29 maj 2011

Operation: bypass PS3 Media Server

I like when things just work when I want to watch a movie. But often when it is time there is always some problem making that evening a technical pain. I could just go and rent a blue ray for 50 SEK, but I am a computer geek, not a movie geek.

One of the "problems" was the setup I had: a nas (Qnap 219p), a computer (not in the living room), a PS3 connected to tv (without network connection). The movies are located in the Qmultimedia folder on the Qnap running Twonky which is accessed from my PS3. In other words I stream from nas to tv. But the problem is that when I downloaded movies to the Qnap they were located in the Qdownload folder, which is not visible. So each time I downloaded a movie I could do two things:
  1. copy the movie from Qdownload to Qmultimedia
  2. start the computer and run PS3 Media Server which has access to Qdownload throw network share
After a lot of copying I ended up doing the latter. Both are manual tasks and nothing is more boring than stupid manual tasks. It was time to stop. It was time for operation bypass PS3 Media Server. Geeky...

The solution was a lot simpler than I thought, well thanks to my cousin:
  1. connect to Qnap with Putty
  2. navigate to /share/Qmultimedia and create a soft link to Qdownload with ln -s /share/Qdownload
On the PS3 you go Video > Twonky Media  > videos > By Folder > here you should have the Qdownload folder visible as shown in the picture.

lördag 28 maj 2011

How I retrieved the movie of my almost dead rabbit

About two weeks ago we got a son and after some time at the hospital we got back home. We have a rabbit and have been curious how he would react to the newborn. To our disappointment there was no reaction, until the fourth day. After endless hours of screaming I found the rabbit laying on his back sleeping. Never heard about or seen a rabbit this way! It looked funny so I quietly told my wife to come and then I grabbed my Nexus S and started filming. With a low voice I called his name. Nothing. Then one more time. Nothing. We both started to panic and my wife screamed "he's dead!". And then the rabbit paniced and we had a priceless movie.

I do use Dropbox on the Nexus S but the app loads slowly so I just use the phone's app for photos and movies. This means that I do some manual syncing of the media to my ftp by using AndFTP. Some days after the rabbit incident I did an upload, but for some reason AndFTP stopped transferring and without verifying I deleted all media on the phone. To my horror I found out that the rabbit movie was not on the ftp and not on the phone...

This is the way I went to retrieve the movie of my almost dead rabbit. After a fast googling I found TestDisc. I plugged in the Nexus to my computer, chose USB storage and in the extracted folder forTestDisc I ran testdisc_win.exe. In the console I did the following selections
  • Create, to create a new log file
  • chose the phone's drive
 
Phone's drive is selected









  • chose None partitioned media
  • chose Analyse
  • pressed enter for Quick Search
  • pressed P to list files
  • navigated to camera folder (DCIM\Camera) and to my surprise I saw all the media I had previously deleted.
  
All the delete files








  • pressed a to select all files
  • pressed C to copy all files

Files are copied to the computer


  •  pressed C to tell that the destination is correct
Some seconds later the rabbit was now back from the dead a second time!

My almost dead rabbit