How to share an internet connection on ubuntu?

this tutorial is focused on sharing an (mobile broadband/EDGE/GPRS) internet connection to LAN on ubuntu 8.10 intrepid ibex.

suppose this is your network topology diagram.


first connect to internet from that pc that is directly connected to the internet.
Goto terminal and type:
sudo apt-get install firestarter
Install firestarter and run it.

Run the wizard and press forward.

Select “ppp0” as the device that connected to the internet.
select “Start the firewall on dialout” checkbox and press forward.

Select “eth0” as the “Local area network device”
and also select “Enable Internet Connection Sharing” checkbox and press forward.

Select “Start the firewall now” and press save.

Now goto the firestarter window and click on preferences.
On the Interface menu, click on policy and check the “Apply policy change immediately” checkbox and click accept.

Start the firewall.

now goto system>preferences>network configuration
Select mobile broadband and select your internet connection (eg. grameenphone, aktel, banglalink etc)

now goto the ipv4 settings and in the dns servers box, note the dns server address.
For grameenphone it should be:
202.56.4.120, 202.56.4.121

In the client pcs, goto system>preferences>network configuration
Select wired and select your network connection and click edit.

click on ipv4 settings and click add,
enter the client pcs ip (like 172.16.16.3) and netmask (like 255.255.0.0) and enter the ip address of the server pc (that is dirctly connected to the internet) as the default gateway (like 172.16.16.2).

now put the dns servers noted before on step x.
For grameenphone it should be:
202.56.4.120, 202.56.4.121

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s