LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-01-2008, 06:39 AM   #1
01pratap01
LQ Newbie
 
Registered: Sep 2007
Posts: 1

Rep: Reputation: 0
Making gateway in Ubuntu


I'm using Ubuntu 8.04. How do i make it gateway for sharing internet
with other PCs using a switch. Other PCs are running on windows XP.
 
Old 10-01-2008, 07:02 PM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
You didn't describe your setup in any detail. I am assuming you have an ethernet connection for your LAN and either a second ethernet connection or some other way to connect to the Internet. In which case, all you should need to do is enable ip forwarding.

I am basing my info on Ubuntu 6.10 -- it is probably still the same. I don't know of a graphical way to do this. In /etc/sysctl.conf I find the following two lines:

Code:
# Uncomment the next line to enable packet forwarding for IPv4
#net.ipv4.conf.default.forwarding=1

# Uncomment the next line to enable packet forwarding for IPv6
#net.ipv6.conf.default.forwarding=1
As directed, uncomment one or both lines. (IPv4 is the Internet Protocol we have been using for eons. IPv6 is a newer version that is now seeing some use. With XP you probably only need worry about IPv4.) You can use your favorite text editor, but you need to be root to edit this file. It is always a good idea to backup configuration files like this before you edit them. (That way, if some *bad* happens, you can always go back.)

This will allow packets from other computers on the LAN to get to the Internet. But those other computers must be configured to use the LAN. They can either be configured manually or with a DHCP server on the LAN. You can use your Ubuntu gateway as a DHCP server by installing the package dhcp3-server. You should be able to find many resources in helping you configure it. For general information about DHCP, see the Wikipedia article. In trying to find something more basic than the Wikipedia article, I found this FAQ. I am not sure if it is simpler, but it might have some good links.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to route in redhat? (making a gateway) urquanmaster Linux - Networking 2 02-15-2007 07:06 PM
making a default gateway permanent csu19032 Linux - Networking 1 07-01-2004 02:28 PM
Making a gateway Vindane Linux - Networking 4 05-30-2004 06:51 PM
Good normal distro for making a gateway banelion Linux - Distributions 4 11-29-2002 11:22 AM
Adding a Gateway and making eth1 the primary unclebyron Linux - Networking 1 04-02-2002 07:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration