2010年4月11日 星期日

PPTP (VPN) connect using pptp client

While I first time try to use pptp client to build the VPN connection. There were various problems occuring in the setup procedures. The most one is that I am not clear understand there are many firewall/NAT routers that set up with pptp blocking rules (don't allow pptp traffics passing through), so we must use private NAT router to allow pptp connections passing through.

We can use Linux pptp client to build the pptp connection under linux system.
http://pptpclient.sourceforge.net/howto-fedora-core-6.phtml

Install PPTP and the pptpconfig GUI using the following commands:

Step1.
# rpm -Uvh http://pptpclient.sourceforge.net/yum/stable/fc6/pptp-release-current.noarch.rpm
# yum --enablerepo=pptp-stable install pptpconfig

Step2.
enter the server, domain, username and password into the Server tab.

Step3.
In my case, I don't need the following setting.
if your PPTP connection need encryption like MPPE, (your administrator says encryption is required), then on the Encryption tab, click on Require Microsoft Point-to-Point Encryption (MPPE).

Step4.
click on Add, and the tunnel will appear in the list.

Step5.
Click on the tunnel to select it, click on Start, and a window will appear with the tunnel connection log and status.

Step6.
if the connection succeeded, you can try the Ping test button. If the ping fails, you should try to find out why before proceeding. If the ping works, then the tunnel is active and you may now work on routing.

Step7.
In most case, the system will produce a new "ppp0" network interface. This is the point to point network interface that the local LAN traffic will communicate with remote pptp server.

We can add the routing entries like following example to specify dedicated routing domains via the ppp interface (If we clear know which destination routing domains)
# route add -net ${NET} dev ${IFACE}
e.g.
# route add -net 192.168.18.0/24 dev ppp0

or simply change the default route to the ppp0 ip address
# route del default
# route add default gw ${PPP0-IFACE-IP-Address}

我要我的孩子知道的20 件事

我要我的孩子知道的20 件事

1. 成功在於做,不在於得
成功就是將我所有的做最好的運用。成功是在於做,而不在於得;是在於嘗試,而不在於勝利。 / 戴韋恩(Wynn Davis)

2. 人生是艱苦的
人生是一連串的問題。我們要去埋怨?還是去解決這些問題? / 派史考特(M. Scott Peck)

3. 人生充滿樂趣
開懷大笑應該是人與生俱來最高層次的天賦本能。 / 克曾茲(Norman Cousins)

4. 我們依靠選擇而活
上帝並沒有問我們要不要來到人世間,我們只能接受而無從選擇。我們唯一可以做的選擇是:決定如何活著。 / 畢亨利 (Henry Ward Beecner)

5. 態度是一種選擇
人所有的一切都可以被奪走,除了一件東西,就是人在任何情況下,選擇自己的態度與道路的自由。 / 法蘭科爾 (Viktor Frankl)

6. 習慣是成功的關鍵
事實上,成功者與失敗者之間唯一的差別在於,他們擁有不一樣的習慣。 / 曼迪諾(Og Madino)

7. 感恩是一種最好的習慣
不要為你所沒有的抱怨 ……要珍惜你所擁有的。 / 朱德(H. Stanley Judd)

8. 把人生建立在尊敬的基礎上
「所以無論何事,你們願意人怎樣待你們,你們也要怎樣待人。」 / 馬太福音七章12 節

9. 誠實依然是最好的策略
「在國際外交事務、人際關係、勞工、商業、教育、家庭與控制犯罪上,誠實是最好的策略。因為,真理是唯一有效的東西,也是建立持久關係的唯一基礎。」 / 克拉克 (Ramsey Clark)

10. 和善的言語成就大事
「世界上沒有幾件事比積極的鼓勵更有力量,一個微笑、一句樂觀、充滿希望的話。當事情遇到困難時,說一句:『你能辦得到。』」 / 德伏斯 (Richard M. Devos)

11. 真正的動機發自內心
「不論你是誰、你年紀多大,如果你想要得到持久永恆的成功,那驅使你邁向目標的動機必須發自你的內心。」 / 梅爾 (Panl J. Meyer)

12. 目標是有底限的夢想
「有目標的人們成功是因為他們知道他們往那裡前進。」 / 奈丁格爾 (Earl Nightingale)

13. 辛勤工作無與倫比
「生命所提供的最好獎賞就是:有機會為值得做的事情辛勤工作。」 / 羅斯福(Theodore Roosevelt)

14. 有得必有失
「決定你要什麼,決定你願意用甚麼來與之交換,把你的前後次序搞清楚,就開始去工作。」 / 韓特(H. Lamar Hunt)

15. 成功者創造時間
「時間是生命,是不可重來、不可逆轉的。浪費時間就是浪費生命;掌握時間就是掌握生命,並充分地使用生命。」 / 蘭凱 (Alan Lakein)

16. 自尊是自己成就的
「自尊是在你內裡深處對自己價值的感受。」 / 魏特利(Denis Waitley)

17. 心靈成長也需要營養與運動
「身心靈和諧的運作,決定了我們整個人與我們的健康。」 / 桑若森博士 (Dr. Carl Thoresen)

18. 每一個人都有失敗經驗
「如果你願意接受失敗,並從其中有所學習;如果你願意相信失敗是一個化妝的祝福,並從中板回優勢,你就有擁有一個最有利的成功因素與潛能。」 / 舒格曼 (Joseph Sugarman)

19. 用心體會人生基本要素
「這是我的秘密,一個非常簡單的秘密,就是人只有用心眼去看才會看得正確,真正基本的東西是用肉眼看不見的。」小王子 (The Little Prince) / 聖艾克斯柏利 (Antoine de Saint-Exupery)

20. 最基本的原則是做一個好人
「盡你所能的做一切的善事,用你一切可能的方法行善。」 / 魏斯理(John Wesley

原著書名: 20 Things I Want My Kids To Know(我要我的孩子知道的20 件事)
中文譯名:黃金階梯 —人生最重要的二十件事
作者: Hal Urban
出版社:宇宙光

2010年3月23日 星期二

How to capture the packet outside the NAT Router

1. We can plug hub connected to the WAN port of NAT Router. And then use NB connected to the hub. Then we can capture packets onto the NB by using capture software (e.g. wireshark).

2. We can plug switch connected to the WAN port of NAT Router.The switch comes with a Port Mirror feature. So we can connect a PC to the mirror port to capture all the packets pass through the switch.

2010年3月4日 星期四

Drive Fitness Test

Disk check and fix tools

http://www.hgst.com/hdd/support/download.htm#DFT


How to create bootable DFT diskette using Linux
The Drive Fitness Test image file (dft-vxxximg.bin) includes a DOS-based Drive Fitness Test program. Running the Linux Disk Dump (dd) utility, creates an DOS-bootable diskette that contains the Drive Fitness Test Utility. A formatted 1.44 MB diskette is required to create the diskette. The Drive Fitness Test is provided for testing our disk drives. The test will not overwrite customer data.
Restrictions: The users guide contains detailed information on the current restrictions for the Drive Fitness Test. See the link at the bottom of this page.
To create a bootable DFT diskette under Linux:
Download the bootable version of DFT (dft-vxxximg.bin) into a known directory on your PC.
Insert a formatted 1.44 MB diskette into your disk drive.
Make sure that the floppy disk is unmounted.
Change directory to where you saved the DFT image.
Run the Disk Dump (dd) utility with the following parameters: dd if=dft-vxxximg.bin of=/dev/fd0 bs=8k Note: /dev/fd0 is the first diskette drive. Use /dev/fd1 if you would like to use the second diskette drive to create the DFT diskette.
The bootable DFT diskette will now be created, Note this could take a couple of minutes .
See the users guide for information on how to run the Drive Fitness Test. To use the Drive Fitness Test with our SCSI hard disk drives you must have the correct ASPI drivers installed. Please refer to the users guide for a list of supported controllers.
Drive Fitness Test Users Guide


Drive Fitness Test
Version 4.16
The Drive Fitness Test (DFT) quickly and reliably tests SCSI, IDE and SATA drives. The DFT analyze function performs read tests without overwriting customer data. (Note: other DFT restoration utilities may overwrite data.)
DownloadsTo run the DFT, you must download the appropriate creator or image and create a self-booting media.
You may create the media under Windows (using the Windows OS version) or Linux (using the binary image), but you must start your system with the DOS-bootable diskette to run DFT.
Drive Fitness Test User's Guide (426 K)Guide to using DFT
Diskette creator for Windows OS (2,130 K)Creates self-booting media to run DFT Read Me Having trouble creating the bootable diskette?
Binary diskette image for non-Windows OS (1,440 K)Creates self-booting media to run DFT Read Me
CD image (2,720 K)Creates bootable CD for Linux, Windows and other operating systems ( requires CD-RW drive and software).

DFT provides 3 media types to run on different platform (e.g. Windows, Linux, Dos...)
* Windows Application
* Bootable CD
* Bootable Disk

2010年3月3日 星期三

Verified Memory Usage

1. top
we can observe the memory usuage from the top 2 lines of mem/Swap usage
Mem: 3693568k total, 850148k used, 2843420k free, 145076k buffers
Swap: 8385920k total, 0k used, 8385920k free, 372780k cached

2. cat /proc/meminfo
# cat /proc/meminfo
MemTotal: 3693568 kB
MemFree: 2830268 kB

3. free
# free -m -t
total used free shared buffers cached
Mem: 7982 3576 4406 0 625 2677
-/+ buffers/cache: 272 7709
Swap: 10236 0 10236
Total: 18219 3576 14643

Disable UAC protection

UAC (User Authorization Control) is a new feature provided from Microsoft Windows Vista version. If you want to disable it, simply go to the
Control Panel -> User Account -> Enable or Disable UAC -> uncheck the "use UAC to protect your computer"
Done

2010年3月2日 星期二

time zone different between Taiwan and American

Amercian East -13 == Taiwan CST
EST -12 (Daylight Saving Time)

American West -16 == Taiwan CST
PST -15 (Daylight Saving Time)

洛杉磯-台灣時間減16小時
紐約-台灣時間減13小時