SoftGanz

Web developer gang.

softganz's blog

How to Share internet connection in Ubuntu

by @May,15 2008 20.31 ( IP : 61...6 )

My home have 3 computer. I want to share internet for all computer.

I search from internet and found Howto Share internet connection from http://ubuntuforums.org.

Following this step and it work!!!!!!

Note: Type all the following commands in a root terminal, DO NOT use sudo.

  1. Start by configuring the network card that interfaces to the other computers on you network:

ifconfig ethX ip

where ethX is the network card and ip is your desired server ip address (Usually 192.168.0.1 is used)

My note : My ethX was eth1 and ip was 192.168.1.1

  1. Then configure the NAT as follows:

iptables -t nat -A POSTROUTING -o ethX -j MASQUERADE

where ethX is the network card that the Internet is coming from

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

  1. Install dnsmasq and ipmasq using apt-get:

apt-get install dnsmasq ipmasq

  1. Restart dnsmasq:

/etc/init.d/dnsmasq restart

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

dpkg-reconfigure ipmasq

  1. Repeat steps 1 and 2.

  2. Add the line "net.ipv4.ip_forward = 1" to /etc/sysctl.conf

gedit /etc/sysctl.conf

  1. Reboot. (Optional)

After reboot , It's work and I set Windows XP on VMware 2Beta to use this share by set DNS to my ISP.

Everything OK!!!!!

Thank for anaoum from http://ubuntuforums.org very much.

From : http://ubuntuforums.org

แสดงความคิดเห็น

« 1789
หากท่านไม่ได้เป็นสมาชิก ท่านจำเป็นต้องป้อนตัวอักษรของ Anti-spam word ในช่องข้างบนให้ถูกต้อง
Bold Italic Underline Left Center Right Ordered List Bulleted List Horizontal Rule Hyperlink Text Color :)

Main Menu

My recomment topics

Hot topics

Download Firefox and add Thai Extension (Source from osdev)

Links

PageRank Plus - Google PageRank checking, with a twist.
query time 25.892 ms.
request time 52.170 ms.