Linux port forwarding is simple to do with iptables which may probably already being used as the firewall or part of the setting up a Linux gateway. In the Linux kernel, port forwarding is achieved by packet filter rules in iptables. Port forwarding Port forwarding also called “port mapping” commonly refers to the network address
Read more
Tag: Server config
Setting Up a NFS Server on Top of tmpfs /dev/shm
Posted ontmpfs has blazing speed. Why not set up a high speed NFS server on top of tmpfs? A little trick is required for setting NFS server on top of /dev/shm. If we add a normal entry in /etc/export and them run # exportfs -a exportfs will give us a warning like this: exportfs: Warning: /dev/shm
Read more
How to Set Up eCryptFS on Linux – The Manual Way
Posted onHow to set up eCryptFS in Linux will be introduced in this post. We can store encrypted files in one eCryptFS directory, the manual way. The content can be seen only after it is mounted as eCryptFS file system. Otherwise, the users can only see garbled characters in the files. Note that this tutorial will
Read more
Setting Up Xen Dom0 on Fedora : Xen 3.4.1 with Linux Kernel 2.6.29 on Fedora 12
Posted onPlease refer to for the latest stable Xen Dom0 solution. In this post, the detailed tutorial for setting up Xen 3.4.1 dom0 on top of Fedora 12 with kernel 2.6.29 will be introduced. Hardware: Dom0 hardware platform: Motherboard: INTEL S5500BC S5500 Quad Core Xeon Server Board CPU: 2 x Intel Quad Core Xeon E5520 2.26G
Read more
Query Installed Files from Package and Package for Installed File in Fedora
Posted onHow to query installed files from a package and query which package one installed file is in will be introduced. Query installed files from a package $ rpm -ql package_name Query which package a installed file is in $ rpm -qf /full/path/to/installed/file
How to Backup Linux Home Directories Using rsync
Posted onI need to backup my Linux home directory to one of my portable hard disk. I tried to use git, but failed since git doesn’t support large file (I failed after many tries, I have file larger than 5G). I find rsync, the fast, versatile, remote (and local) file-copying tool and I am happy with
Read more
How to Set Up Password-less SSH Login on Linux
Posted onAutomatic passwrod-less ssh login can make our life easier. To enable this, we have 2 options: using key-based authentication by copying our SSH public keys to the remote machines for automatic password-less login or using password-based authentication. I will introduce the 2 options in the post. Before you start, please note that key-based authentication is
Read more
Mounting Remote Folder Through SSH
Posted onSSH is a very convenient tool on Linux that can be used to [[port-forwarding-using-ssh-tunnel]], [[proxy-using-ssh-tunnel]] and others besides its basic functions (remote shell). We can also use SSH to mount a remote folder to a local directory. We can use `sshfs` to mount remote folder through SSH tunnel securely over network. Install sshfs Install `sshfs`
Read more
Sending Email Using mailx/s-nail in Linux Through Gmail SMTP
Posted onThe heirloom mailx (or s-nail if you are using Ubuntu 18 or later or similar releases) command in Linux is still providing service for guys like me, especially when we need to send email automatically by script. Gmail is great. Now, how to use gmail’s smtp in mailx/mail? gmail is a little special since gmail’s
Read more
Setting Up Linux Network Gateway Using iptables and route
Posted onSharing 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
How to Control or Disable SELinux in Fedora and CentOS Linux
Posted onFor 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
Start a Job and Return to the Shell : Run a Backgroud Job
Posted onUnder some situation, we want to start some long jobs and then return to the shell to continue our work. We can do this by starting a job in the background. The shell such as bash will keep a list of background jobs and their status. But only one foreground job is allowed. Job control
Read more
Add More Loop Device in Linux
Posted onWe need more loop devices on Linux than the default number (most commonly 8) some time, such as we are building 12 or more virtual machines on top of xen using loop device backed VBD. In this post, we want to use 32 loops. 1. If loop device is compiled directly in the kernel Pass
Read more
Create and Manage Virtual Machines on Xen
Posted onIn this post, these content are introduced: Create and manage file-backed virtual block device (VBD) for virtual machines on xen. Install Fedora 11 via internet as DomU on top of xen. Manage virtual machines using xm. Create file-backed VBD: The actual space of VBD will be the amount of disk the virtual machine used. And
Read more