Setting Up Linux Network Gateway Using iptables and route

Posted on

Sharing the networking is important and setting up a gateway is a good solution to it. Building up the gateway on a Linux box is easy, cost efficient and reliable. With a Linux box, you can share the internet connection or the only cable connected to the network. The Linux box network configuration The Linux
Read more

Guake: An Excellent Quake Like Drop-down Terminal for Gnome

Posted on

Guake is very fast and stable enough for use. It’s an excellent quqke like drop-down terminal for gnome. I used yakuake on KDE. It’s professional but a bit slow. I used tilda also on gnome. But unfortunately, there are too many bugs. Then after I find Guake, I am happy. Guake is invoked with a
Read more

How to Control or Disable SELinux in Fedora and CentOS Linux

Posted on

For most of cases, you should not disable SELinux. However, for some users, SELinux may cause problems or is not needed. We may just make it not block operations or totally disable it. Making SELinux log warnings instead of blocking For many cases, people find SELinux blocks operations. For tests or some other situations, you
Read more

How to Set Up Socks Proxy Using SSH Tunnel

Posted on

We can set up a socks proxy on top of a SSH tunnel. Besides the common proxy functions, such as web browsing, the proxy on top of SSH tunnel also ensures the security between the browser and the proxy server (the SSH server). In this post, we introduce and explain how to set up a
Read more

Automatically Backing Up Xen File-backed DomU

Posted on

A script for backing up file-backed Xen DomU is introduced in this post. This script can be changed to similar platform. In our cluster, virtual machines are stored under /lhome/xen/. Virtual machine with id vmid is stored in directory vmvmid. The raw image disk file name can also be derived from vmid. Some more details
Read more

Unified Xen DomU configuration file

Posted on

Previously, we create a configuration file for each DomU virtual machines in our cluster. Most of the content in these configuration files is the same. The differences are only the name, memory size and image file address. There are several disadvantages of this method: We must create and configure a new configuration file when creating
Read more

An I/O Performance Comparison Between loopback Backed and blktap Backed Xen File-backed VBD

Posted on

I have done some I/O performance benchmark test of Xen DomU. For easier management, some of our DomU VMs are using file-backed VBDs. Previously, our VMs are using Loopback-mounted file-backed VBDs. But blktap-based support are recommended by Xen community. Before considering changing from loopback based VBD to blktap based VBD, I have done this performance
Read more

lftp Disable SSL

Posted on

lftp some times stalls with message “Making data connection” when “ls” the directory after logged in the ftp site. The message may appear like this: < — 227 Entering Passive Mode (xx,xx,xx,xx,xx,xx) —- Connecting data socket to (yy,yy,yy,yy) port zz `ls’ at 0 [Making data connection…] But some client such as filezilla may works on
Read more

How to Flush DNS Cache of Linux and Windows Client

Posted on

We may need to flush DNS cache of our client when the site’s DNS has been changed. Flush DNS cache of Linux with NetworkManager/dnsmasq You may simply restart NetworkManager by sudo systemctl restart NetworkManager Flush DNS Cache on (Old) Linux with nscd 1) Use su – to get root privilege or sudo with the following
Read more

Mostly Used MPlayer Keyboard Control Shortcuts

Posted on

MPlayer has a fully configurable, command-driven control layer which allows you to control MPlayer using keyboard. But which are these shortcuts are not immediately know to users of MPlayer. Below is a list of mostly used MPlayer keyboard control shortcuts. They come from the [[man:1|mplayer|mplayer manual]] where you can find a full list of all
Read more

How to Remote Control Linux Server Using VNC through SSH Tunnel

Posted on

Sometimes we need to have the GUI of some application on the remote server. ssh’s X11 forwarding with “-X” parameter is a good and fast method. But if we want to have a whole desktop environment, vnc is a good choice. In this post, the method of how to control remote server using vnc through
Read more

A Simple CPU and Memory Performance Test of Xen Dom0 and DomU

Posted on

Please refer to Setting Up Xen Dom0 on Fedora : Xen 3.4.1 with Linux Kernel 2.6.29 on Fedora 12 for the platform of this test (this test runs on Fedora 11, however). I have done some simple performance test on DomU and Dom0 and compare with the performance on physical machines. These test are simple,
Read more

How to Duplicate Xen DomU Virtual Machines

Posted on

Assumption: There are VBD based Xen DomU virtual machines stored under /home/xen/vm-f11-sample/. There are two files under vm-f11-sample: vm0-f11.run (The configuration file) and vmdisk0 (The virtual disk). Now we want to duplicate the virtual machine vm0 stored under vm-f11-sample to vm-10.0.0.213 which is stored under vm-10.0.0.213. And vm-10.0.0.213’s ip will be 10.0.0.213. The steps to
Read more

MPlayer使用中文字幕

Posted on

mplayer 使用中文字幕文件时经常会出现乱码问题. 以下是解决办法: 1. 外挂字体方法 比如当前目录下有文件为Gone with the Wind.avi, 字幕文件为: Gone.With.the.Wind.1939.Bluray.720p.DTS.2Audio.x264-CHD.chs.srt 可以使用如下命令来播放, 将不会出现中文字幕乱码的问题了: mplayer -ass -subcp cp936 Gone with the Wind.avi -sub Gone.With.the.Wind.1939.Bluray.720p.DTS.2Audio.x264-CHD.chs.srt 对于以上参数的解释: -ass: Turn on SSA/ASS subtitle rendering. With this option, libass will be used for SSA/ASS external subtitles and Matroska tracks. You may also want to use -embeddedfonts. NOTE: Unlike normal OSD,
Read more

The WordPress Desktop Client – lekhonee

Posted on

I find a desktop client for publishing to WordPress blogs – lekhonee[1]. I find it interesting and easy to use. This is the first post using it. The interface is simple, but it can provides most of the functions: * Writing post. * Select categories. * Add tags. * Load and Edit the old post.
Read more

Minimizes Thunderbird Windows into the System Tray

Posted on

I usually keep Thunderbird open when my computer is open. But Thunderbird is minimized to the taskbar. It will be more convenient if it is minimized or closed to the system tray as an icon.It will be better if it can display the number of unread messages. Mozilla’s software’s addon system give the method to
Read more

Vim Removing “^M” Returns from Files

Posted on

When editing some files fro Windows in vim, there are some ugly “^M” returns. Here is a method to remove and replace these “^M”s (please note that you should not copy/past to use the follows): :1,$s/{Ctrl+V}{Ctrl+M}//{Enter} {Ctrl+V} means keyboard operation that is push ‘ctrl’ and ‘v’ together. {Enter} is push ‘enter’. : means that it
Read more

Howto: Git Server over SSH

Posted on

Git and SSH are both powerful tools, and git/ssh work well together. We introduce how to set up git server via ssh in this post. Git server through SSH is easy and fast to set up, although every user will have access to all repositories in the git server over SSH and every user is
Read more