LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-06-2007, 04:53 PM   #1
trox
Member
 
Registered: Jan 2006
Distribution: Linux Mint 12, FreeBSD, Ubuntu 12.10, Mac OS X
Posts: 83

Rep: Reputation: 15
Ubuntu 7.04 as a gateway for 2 Winxp computers


Hi all,

I am trying to set up my Ubuntu box as a gateway to the internet while using my Belkin router to connect two other Winxp computers to it.

I have these:

Ubuntu box with 7.04 with (2) ethernet cards
HP desktop wtih WinXP Media Center
HP laptop with WinXP Media Center
Belkin router

I have googled to many confusing instructions and am limited in my networking knowledge. Command line or Gui is fine. I know it can't be that difficult. Any ideas?

Thanks,

trox
 
Old 05-07-2007, 04:33 PM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 76
It’s not that hard (especially if you’re using static IP addressing for your “internal” network). Steps to take:
  1. Set up your first network interface (which I will now call eth0) on your Ubuntu box as normal.
  2. Plug your second interface (eth1) into the switch.
  3. Plug the other computers into the switch.
  4. Assign to eth1 (on Ubuntu comp) a static IP address (with a reasonable netmask) in the private range. E.g., 192.168.0.1/24.
  5. For the other computers, assign other (unique) numbers from within the subnet you previously chose. E.g., 192.168.0.2/24 and 192.168.0.3/24.
  6. For the other computers, put the ip of your previous machine (e.g., 192.168.0.1) into the “gateway” or “default router” field.
  7. Enable ip forwarding on your Ubuntu box (i.e., “sysctl net.ipv4.ip_forward=0”).
Now you have a rudimentary network set up. Assuming you have no extra-ambitious “firewalling” or packet filtering on any of the machines, you should be able to ping between all of them. You should also be able to ping to external ip’s from inside. Now, you might take some more steps to ease the use of the internet by your internal lan:
  1. Figure out your DNS server(s) on your Ubuntu box (“cat /etc/resolv.conf”) and put them into the “DNS server” fields on the network setup screens on the other computers. Now, instead of doing “ping 64.149.4.146” you can do “ping linuxquestions.org” from your internal LAN.
  2. Set up some sort of packet filtering to protect your internal LAN from bad stuff. You might also want to implement port forwarding if you are serving anything on your internal network’s computers.
  3. Set up a dhcp server to automatically assign the ip address, default router, and dns server(s) for any machine you happen to plug into the switch. You mi
  4. Set up your own caching DNS server for use by your internal LAN. You can also use this nameserver coupled with the dhcp server to resolve hostnames for your internal lan (which comes in mighty handy).
HTH, if you have any questions, just post.

Last edited by osor; 05-07-2007 at 04:34 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Will Ubuntu on USB work on different computers? dracolich Ubuntu 5 04-27-2007 04:08 AM
Slackware as gateway (ICS) for WinXP c31c Slackware 3 11-02-2005 02:33 PM
internet gateway+mail sever+WinXP+SuSE.... djdevx SUSE / openSUSE 0 09-03-2005 03:28 AM
WinXP Software to allow Linux computers online. jmorse General 6 04-09-2004 11:44 AM
RedHat 7.2 WWW access through WinXP gateway (I know, I know...) eatmetal Linux - Networking 1 03-19-2004 05:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:15 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration