How To Share Dialup Internet Connection On Ubuntu Server

This article explain how to share your dialup internet connection on ubuntu linux. Just to share with the other. Here you are.

1. Change your statict network interface. In this example is eth1.
# vim /etc/network/interfaces

auto eth1
iface eth1 inet static
address 192.168.0.254
netmask 255.255.255.0
broadcast 192.168.0.255

where eth1 is the network card and ip is your desired server ip address. I used 192.168.0.254 as IP Address.

2. Configure the NAT:

# iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

where ppp0 is the network card that the Internet is coming from. Use ppp0 for dialup connection.

# echo 1 > /proc/sys/net/ipv4/ip_forward

3. Install dnsmasq and ipmasq using apt-get:

# apt-get install dnsmasq ipmasq

4. Reconfigure ipmasq to start after networking has been started:

# dpkg-reconfigure ipmasq

5. Add the line “net.ipv4.ip_forward = 1″ to /etc/sysctl.conf

# vim /etc/sysctl.conf

6. Set your client DNS to 192.168.0.254

How to recover images from formatted memory card

A few days ago, My friend’s SD card accidentally formatted. While in the SD card is a memorable photographs of the birth of their first son. To restore these photos I recommend to use the recovery tool. To find the recovery tool, I told him to look for in google.

There are some recovery tools that are used. All are Windows programs. However, none of which succeeded. This is because the tool is a trial version. Meanwhile, to get the full version required to buy it. Fortunately I have a Ubuntu Linux machine which Ubuntu Lucid Lynx LTS upgrade from Ubuntu LTS Hardy Heron, minimal installation with LXDE. And finally my friend’s problem could be solved with the help of my Ubuntu Linux machine.

Here are some things you need to do with simple commands. This tutorial is written for Ubuntu GNU/Linux, but should be similar for most Linux machines.

1. Make a copy of the image of your SD card.
sudo dd if=/dev/sdb of=SDCARD-backup.img bs=1M

2. Install recoverjpeg package via apt-get
sudo apt-get install recoverjpeg

3. Run the command below.
$ recoverjpeg SDCARD-backup.img
Restored 398 pictures

The pictures that have been recovered will be stored in a folder. Please see the recovery that have been made. Good luck … Go Opensource .

Simple WordPress Themes

Simple is my next WordPress themes. Simple WordPress Themes consist of only 2 files, index.php and style.css. Simple WordPress themes is Valid CSS and Valid XHTML 1.0 Transitional.

As the previous themes, Simple WordPress Theme is released under a Creative Commons Attribution License 3.0. Here’s the source code of the Simple WordPress Theme.
Read the rest of this entry »

How to add Breadcrumbs without plugins on WordPress

Most of the blog with SEO considerations using breadcrumbs. In this article I am going to show you how to do proper, full breadcrumbs in including nested categories and nested pages. Breadcrumbs are a pretty standard design pattern and can be very useful in a lot of website situations. For WordPress users typically use plugins. But for those who want to add facilities in bredacrumbs WordPress-based blog without using plugins, try my way below.

You can just include this function in your theme’s “functions.php” file.

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
function get_wp_breadcrumbs() {
	if (!is_home()) {
		echo ('You are here: '); 
		echo '<a href="';
		echo get_option('home');
		echo '">';
		echo 'Home';
		echo "</a> » ";
		if (is_category() || is_single()) {
			the_category(' &raquo; ',multiple);
			if (is_single()) {
				echo " » ";
				the_title();
			}
		} elseif (is_page()) {
			echo the_title();
		}
 
	}
	else { 
	echo ('You are here: '); 
	echo '<a href="';
	echo get_option('home');
	echo '">';
	echo 'Home';
	echo "</a> » ";
	}
}

And then add the following code in the “header.php” file.

108
<?php get_wp_breadcrumbs(); ?>

So there you have it. Fully customizable, valid breadcrumbs in Wordpress. Please let me know what you think.