Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Linux Mint 12, FreeBSD, Ubuntu 12.10, Mac OS X
Posts: 83
Rep:
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?
It’s not that hard (especially if you’re using static IP addressing for your “internal” network). Steps to take:
Set up your first network interface (which I will now call eth0) on your Ubuntu box as normal.
Plug your second interface (eth1) into the switch.
Plug the other computers into the switch.
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.
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.
For the other computers, put the ip of your previous machine (e.g., 192.168.0.1) into the “gateway” or “default router” field.
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:
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.
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.
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
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).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.