Saturday, 28 May 2016

QNAP Container Station

Docker in QNAP Container Station

A very light weight virtual environment for sandbox.

Docker networks:

-Bridge
-Host
-None
-Qnet (*Available on QNAP CS only)

The first three networks are built into Docker. When you run a container, you can use the --network flag to specify which networks your container should connect to.

Containers connected to the default bridge network can communicate with each other by IP address.

The host network adds a container on the host’s network stack. There is no isolation between the host machine and the container. If you run a container that runs a web server on port 80 using host networking, the web server is available on port 80 of the host machine.

The none and host networks are not configurable in Docker. You can configure the default bridge network, as well as your own user-defined bridge networks.

QNAP Qnet Docker Command

With QNAP CS, you can also use Docker command to create a network that belongs to Qnet driver and run a container with --net argument.
I will say the above in English :
It means you can bridge docker network to host network!!
Both docker and host can reside on the same LAN segment, and looks like 2 machine. 

DHCP mode

Create a new network named qnet-dhcp-eth1.

    $ docker network create -d qnet --ipam-driver=qnet --ipam-opt=iface=eth1 qnet-dhcp-eth1

Static mode

Create a new network named qnet-static-eth1.

    $ docker network create -d qnet --ipam-driver=qnet --ipam-opt=iface=eth1 \
          --subnet=192.168.18.0/23 --gateway=192.168.18.254 qnet-static-eth1

Reference:

https://docs.docker.com/engine/userguide/networking/
https://qnap-dev.github.io/container-station-api/qnet.html
https://success.docker.com/KBase/Multiple_Docker_Networks


Monday, 1 July 2013

Obi110 Voip SIP ATA

Obi110 is a great VOIP ATA for those frequent traveler intent to keep in touch with buddys and family members back at home.

Let's take a look at this small little box with VOIP magic that save thousands of dollars for my IDD phone call.
 

Wednesday, 14 March 2012

你在不公正的情形下保持中立,那你其实已经选择站在压迫者的一边

“If you are neutral in situations of injustice, you have chosen the side of the oppressor. If an elephant has its foot on the tail of a mouse and you say that you are neutral, the mouse will not appreciate your neutrality.”

~~ By Desmond Tutu, South African cleric and activist who rose to worldwide fame during the 1980s as an opponent of apartheid.

“如果你在不公正的情形下保持中立,那你其实已经选择站在压迫者的一边。如果大象把它的脚压在老鼠的尾巴上,而你说你是中立的,沒有人会欣赏你中立的立场﹗”

~~ 图图

Wednesday, 1 February 2012

[曹軒賓]可惜不是你

這一刻 突然覺得好熟悉
像昨天 今天同時在放映
我這句語氣 原來好像你
不就是我們愛過的證據

差一點 騙了自己騙了你
愛與被愛不一定成正比
我知道被疼是一種運氣
但我無法完全交出自己

*努力為你改變
卻變不了 預留的伏線
以為在你身邊 那也算永遠

彷彿還是昨天
可是昨天 己非常遙遠
但閉上我雙眼 我還看得見*

#可惜不是你 陪我到最後
曾一起走 卻走失那路口
感謝那是你 牽過我的手
還能感受那溫柔#

那一段 我們曾心貼著心
我想我更有權利關心你
可能你 已走進別人風景
多希望 也有 星光的投影

REPEAT*##

感謝那是你 牽過我的

Thursday, 15 December 2011

Wednesday, 30 November 2011

21112012

Album of Memory (image in progress...)



Friday, 16 September 2011

旅-旅

National Museum
The oldest Museum in Singapore back to 1849. What a pity i just visit half of the Museum due to lack of time.


 High-end camera originally made by German company.








 Decoration of the Rotunda.


Sunday, 28 August 2011

SriLanka - AUG2011 Ver2

Galle is the best example of a fortified city built by Europeans in south and southeast Asia.
The Galle fort is a world heritage site and the largest remaining fortress in Asia built by European occupiers.
In fact, Galle Fort just out beat Melacca Fort.
Journey from Mt. Lavinia to Galle Town
We drop by the seaside.
Grrr, i got my shoes deep in the seaside....

Along the road,
Sea Turtle @ Bentota South










Galle Town

Tuesday, 26 July 2011

Mobile IPsec on Pfsense

You can connect a number of devices to pfSense 2.0 using IPsec, most notably Android (Phones and Tablets) and iOS (iPhone, iPad, iPod Touch, etc) devices but anything that is capable of IPsec will typically work. This document covers the most common setup for mobile devices, which is IPsec using Xauth and a mutual Pre-Shared Key.

1. IPsec Server Setup

This is the setup for the pfSense side of the connection
#Mobile Clients

Monday, 25 July 2011

Setup Debian netboot server on Synology

1. Install dnsmasq

Before installing dnsmasq, install optware if you haven’t done so (see [1]). Then install dnsmasq via ipkg:
ipkg install dnsmasq

2. Configuration

Edit dnsmasq.conf in /opt/etc, the following is sample config (or check the original example [2]):
# DHCP IP range and lease
dhcp-range=192.168.0.100,192.168.0.200,255.255.255.0,12h
dhcp-leasefile=/opt/var/lib/dnsmasq.leases
# DHCP Fixed IP settings
dhcp-host=XX:XX:XX:XX:XX:XX,192.168.0.101
# DHCP gateway option
dhcp-option=option:router,192.168.0.1
# DHCP dns option, if you don't want to use dnsmasq's DNS service
dhcp-option=option:dns-server,8.8.8.8,4.4.4.2
 
# PXE boot options
dhcp-boot=pxelinux.0
enable-tftp
tftp-root=/volume1/netboot

3. Prepare tftp root directory

The above configuration sets the root directory for tftp server to /volume1/netboot. If it is not there already, create it and put Debian netboot files ([3]) there.
mkdir /volume1/netboot
wget –O - http://ftp.debian.org/debian/dists/stable/main/installer-amd64/current/images/netboot/netboot.tar.gz | tar xzf -