If you need to share a single internet connection to other devices in your network, then NAT is the way to go. Most network appliances with routing capability include this by default. In a cloud virtual data center, you either need to use those fancy modules (that would certainly cost you), or add a virtual network appliance from cisco or others (again, cost more than a dime). Or if you have a disk, processor, and ram to spare, build a linux box and setup NAT with iptables. For the purpose of this tutorial, this is how the network is set:
The first 3 nodes on the left are connected only to the internal network, and the internal network subnet is 192.168.11.0/24. The most right node has 2 interfaces. For this tutorial, eth0 has a public IP address and is connected to the internet. The eth1 is connected to the internal network and shall act as the internet gateway for devices that reside on the internal network. The IP assigned to eth1 is 192.168.11.2
1. Setup and prepare linux box
Pick your fave flavor of distro. Distro with small footprint such as puppy are good choices. CentOS or Suse will do fine as long as you can trim uneeeded components and services that are installed by default. For this tutorial, I picked ubuntu. A single core, 2GB, with minimal disk should suffice. The instance shoud have 2 interface, with one connected to the internet, and the other attached to the internal network. Enable IP forwarding on the kernel by performing:
root@echo:~$ echo 1 > /proc/sys/net/ipv4/ip_forward
2. Make sure iptables packages are installed
Iptables is a standard linux package, and should be available by default on any linux install. Newer version of ubuntu uses ufw as iptables front end.
For Ubuntu and other .deb distros:
root@echo:~# dpkg -l | grep iptables ii iptables 1.4.12-2ubuntu2 amd64 administration tools for packet filtering and NAT
For CentOS and RHEL derivatives:
[root@whisper ~]# rpm -qa | grep iptables iptables-1.3.8-5.fc8 iptables-ipv6-1.3.8-5.fc8
3. Setup iptable rules for NAT
First, clean up the existing tables
root@echo:~# iptables --delete-chain root@echo:~# iptables --flush root@echo:~# iptables --table nat --delete-chain root@echo:~# iptables --table nat --flush
Next, to setup the NAT table. Start by allowing forwarding for incoming traffic from internal network
root@vpnc:~# iptables -A FORWARD -s 192.168.11.0/24 -j ACCEPT
..and then setup NAT for traffic from internal network, exiting through eth0 to the internet
root@vpnc:~# iptables -t nat -A POSTROUTING -o eth0 -s 192.168.11.0/24 -j MASQUERADE
To test the NAT, go to one of the node inside the internal network, set the defaul gateway to the ip of eth1 (in this case, 192.168.11.2), set the DNS accordingly (you can use google’s 126.96.36.199). Open a browser and see if you can access the internet from there.
Filed under: android, Go Go Gadget..Stuff!! | Tags: android, artflow, mx player, pie control, smart wifi toggler
- Pie Control
I have a Samsung Galaxy S4. While the screen is gorgeous, it also, at more than 5″, rather large and unwieldy. The distance my thumb needs to travel between pulling down the notification tray, to pressing nav buttons at the bottom of the screen severely limits single hand usage. To make the matter worse, Samsung decided to employ their own set of navigation button scheme, making certain activities such as opening Google Now, or opening the multitasking list rather difficult. Enter Pie Control.If you are familiar with Quick Control on Android’s AOSP native browser, Pie Control looks and works just like that. Of course, instead of only on AOSP browser, you can access the pie menu from any screen, and instead of browser function, you can assign app shortcuts, navigation actions such as home, to starting the camera
If you browse with Chrome on your PC, you should be familiar with its’ bookmark sync function. Basically, bookmarks that you created on your PC browser will be available on your phone’s chrome or AOSP browser. Firefox has one too, but it will only work with Firefox mobile. With Pocket Firefox extension, you can create bookmarks on Firefox at your PC, then open it later on your android devices. Pocket is also available for Chrome via Chrome webstore
One limitation of most of cloud storage client on mobile devices is that they rarely cache your files locally at the handset. So when you need a file from your cloud folder, you need to download the files to your phone first, and if you’re happened to be out of network coverage, you’re screwed. With Dropsync, you can put all of your important files, those that need to be available at any time you need them, on a single folder inside your dropbox folder and use Dropsync to automate synchronization to your mobile devices. It has plethora of settings for your convenience. Among other things, you can set it to sync every hour or once a day, or you can make it so it will only start syncing when wifi connection is available.
- Nova Launcher
The open nature of android allows mobile device makers to slap their own user interface on top of the OS. This of course yields very mixed result. Sometime you get something light and elegant such those on Xperia Z and Miui, and on the opposite end of the spectrum, a total train wrecks such as the Samsung’s Touchwiz. Nova Launcher replaces the launcher that comes with your phone to one that more closely resemble the android 4.x stock launcher. It’s very light, fast and highly customizable. Purchasing the Prime will give you additional function such as unread counts and gestures. If you are stuck with Touchwiz, and would like to try a more pure android experience, but doesn’t quite ready for flashing and rooting, then Nova Launcher is the answer. Who knows, you might even get a little boost in performance.
- Smart WiFi Toggler
I used to own a Sony Xperia Z and one thing that I like the most about the handset is the power management features. One of them is the location based WiFi switch. By reading through the network, the phone will recognize whether it’s in the area with known WiFi access point nearby, such as your home or the office, and it turns on WiFi and automatically connect to that particular access point. When you move away and are out of the range of the access point, it will automatically turn off the WiFi. With Smart WiFi Toggler, I can replicate this function on my S4. One minor point that you should take a note, the app seems to be less accurate than the one from Sony. For example, the XZ WiFi will be automatically turned on when I’m about to open the gate to my house, so it’s about 3-5 meters away from the wireless router, while the Smart WiFi toggler will start the WiFi when I’m still about 15-20 meters from home. If you don’t get into the range of the access point within certain amount of minutes, it will disable the auto on function, and you need to re-enable it again.
- Team Viewer Quicksupport
If you own a samsung handset, or a rooted handset, you can now remotely access your phone screen using TV Quicksupport. You can use it to provide assistance to your less tech savvy cousins, or mundane stuff like replying your whatsapp messages from your PC screen
So I hate Windows 8 “Modern Stye” UI but I absolutely love Segoe UI, the font that comes with Metro UI. I love it very much that I use it on my Gnome Shell. To do this on my phone, I need iFont. With iFont, you can look for alternative fonts, and apply them to a Touchwiz equipped phone. Other ROMs are supported but root access may be required.
- Falcon Widget
The new twitter client is great, but the widget still leaves a lot to be desired. Falcon Widget is a widget-only twitter client, so resides only on your homescreen, and has very limited set of functions. You can see updates, reply to twits, and a bunch of other stuff, but you cannot delete tweet, see retweets and faves. Use it on its’ own if you can live with its’ limited feature set, or use it to complement the official twitter app, it’s up to you.
- MX Player
MX Player is my to go media player on Android. It supports many popular formats, can play media straight out of file shares, support hardware acceleration and can be operated via touch gestures. For example, swiping up or down on the right side of screen control volume, the left side give you control over brightness, and swiping horizontally on the screen move you move you forward or backward on the video
If you own a Galaxy Note (2, 10.1, 8.0, 3, whatever) and you like to draw or making sketches, then you owe it to yourself to try ArtFlow. it has a very clean and straightforward user interface, layer support, and it’s optimized to be used in conjunction with pressure sensitive styli. The pro version has more brushes and tools, increase the layer limit from three to seven or sixteen (depend on what device do you have), and a bunch of other functions.
So there you go.
As you may know, almost all of Samsung’s flagship smartphones since Galaxy S3 are equipped with a wireless charging capabilities. They support the Wireless Qi charging standard, and you must purchase a separate back cover for the phone. For the galaxy S4, you need to have the wireless charging back cover and wireless charging pad. The official kit with set you back around USD100 in total, and it has limitation that it cannot be used together with the S4′s flip cover
The good things in having a popular phone is that you can never be out of options for third party accessories. Sites like dealextreme and aliexpress provide plenty of cheap selections, although most of them are chinese knockoff or replica. Both sites offer free shipping to Indonesia via airmail. It may take 2 to 4 weeks for your package to arrive.
Filed under: *Nix, Red Hat, rhel, time out | Tags: linux, rhel, san, storage, xiv
To use the IBM XIV to its’ fullest potential, the host attachment kit is necessary. With Host Attachment Kit, managing XIV path and LUNs is a straightforward task. Of course if you prefer micromanaging stuff a bare multipath install on RHEL is sufficient. So now let’s get into it.
This is tested on AIX 6.1. When you try to add a disk to an existing VG, by doing:
#extendvg vgdata hdisk20
you may receive the following error message:
0516-1714 /usr/sbin/extendvg: The total number of partitions on the disks for this volume group would be 184302, which exceeds the current maxpps value of 131072. Increase the maxpps value to 262144 using the chvg -P command, then retry. 0516-792 /usr/sbin/extendvg: Unable to extend volume group"
bash-3.00# lsvg vgdata VOLUME GROUP: vgdata VG IDENTIFIER: 00c39a0200004c000000012bb22891c2 VG STATE: active PP SIZE: 8 megabyte(s) VG PERMISSION: read/write TOTAL PPs: 122871 (182952 megabytes) MAX LVs: 256 FREE PPs: 1 (8 megabytes) LVs: 2 USED PPs: 111870 (982960 megabytes) OPEN LVs: 2 QUORUM: 2 (Enabled) TOTAL PVs: 2 VG DESCRIPTORS: 3 STALE PVs: 0 STALE PPs: 0 ACTIVE PVs: 2 AUTO ON: yes MAX PPs per VG: 131072 MAX PVs: 1024 LTG size (Dynamic): 256 kilobyte(s) AUTO SYNC: no HOT SPARE: no
As you can see, the current maxpps per vg for the vgdata volume group is 131072 pps, and to increase the size of the vg from 1TB to 1.5TB requires 184302. To solve this problem, (more…)
Filed under: time out
You put up a good fight dad, see you on the other side
Filed under: gaming, Go Go Gadget..Stuff!! | Tags: bluetooth, gaming, logitech, M905, mouse, notebook, orochi, razer, review, wireless
I don’t have desktop anymore. I game, browse, and do works on my laptop, which I lug around almost every day. Naturally, I look for a notebook mouse to accompany the laptop, something that’s small so that it won’t take too much space on my increasingly cramped backpack.
The M905 and the Orochi represent the two opposing polars of notebook mice world. Logitech crams everything but the kitchen sink (and internal charging mechanism, we’ll talk about this later) into the tiny sleek body of the M905, while Razer built the Orochi with the sole intent of breaking speed record of the notebook mice class, figuratively speaking. Obviously, the two of them are targeted at two different market.