Showing posts with label planet ubuntu. Show all posts
Showing posts with label planet ubuntu. Show all posts

Jul 22, 2008

2

How to Share Your Internet Connection on Ubuntu

There is several ways to share internet connection using Ubuntu Server. But this in this tutorial, I'll be using one method that is quite simple and proven to be working on Ubuntu Hardy. But as far as i know, this kind of setting will work on any distribution which support iptables.

Here is the steps to share your internet connection:

  • Run as root:
sudo -s
  • Then change the setting in sysctl to allow ip forwarding by running this command:
sysctl -w net.ipv4.ip_forward=1
  • By the way, sysctl actually will run on Ubuntu startup automatically, but to be sure just edit the /etc/sysctl.conf:
#nano /etc/sysctl.conf
net.ipv4.ip_forward = 1
iptables
Then we need to masquerade the service. This could be a little bit tricky, but still it's easy to use. Let say if your server connected to internet using wireless device, so the device interface should be wlan0. And a network card connected to your local area network is eth0. So here is some example in the interface setting:
wlan0:
IP = 10.41.57.103
netmask = 255.255.0.0
gateway = 10.41.57.254
  • The ethernet setting:
eth0:
IP = 192.168.1.10
netmask = 255.255.255.0
gateway = 10.41.57.254(IP for the gateway of wlan0)
  • If you can see, the setting for eth0's gateway is using the same gateway as wlan0, so we need to masquerade it using iptables to allow packets to be forward through 2 interfaces. To masquerade, here is the command:
#iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
#service iptables save
It's all done with the server setting, now we have to do the setting for client pc, in this example, the client is using winxp, so all we have to do is to set the ip manually. The ip should be like this:
IP = 192.168.1.100 (Well the ip can be anything but have to be on the same class)
netmask = 255.255.255.0
gateway = 192.168.1.10
DNS = 192.168.1.10
So this one should help all user to share internet connection using Ubuntu Server. I'm not expert on the network subject but this one is simple and easy to understand. I hope this will help you out.

Bookmark This Article:

Feed Me Digg this Stumble Upon this Send this Reddit this Add to Technorati Favorites Directory of Computers/Tech Blogs Programming Blogs - BlogCatalog Blog Directory

Your Ad Here

Jun 30, 2008

0

Ubuntu Malaysia New Planet

Well this post is just an announcement of a new Ubuntu Malaysia site which is called Planet Ubuntu Malaysia. Well basically this is the official Ubuntu Malaysia Planet which will gather all the Ubuntu-my member's blog to be review on one site.


I would like to encourage all of the Ubuntu Malaysia's members to help and try to design a new logo for our planet. Well basically the logo should reflect our community logo. I hope I will have better response to this one. All idea's and artwork are very welcome.

By the way, please visit and subscribe to our LoCo planet via feeds. And please let me know if you would like your blog to be publish on the planet. For any request to be syndicate with the planet, please refer to Ubuntu Malaysia Forum as I have made a post there.

Bookmark This Article:

Feed Me Digg this Stumble Upon this Send this Reddit this Add to Technorati Favorites Directory of Computers/Tech Blogs Programming Blogs - BlogCatalog Blog Directory

Your Ad Here