LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 09-20-2005, 08:52 PM   #1
gibran
Member
 
Registered: Jul 2005
Location: California
Posts: 36

Rep: Reputation: 15
Thumbs up Newbie Network


I was reading you could hook up two NICs to one box and route a cable connection through it into the router. That was I could use the linux computer as a firewall and network control, correct?

If so, how would i exactly go along doing this. Im in a class learning the technical side of networks but nothing hands-on yet. I learned about the OSI model and such but im nowhere close to getting on something like this.

I was just hoping someone could point me to a tutorial perhaps? Anything that could help me out would be much appreciated. I would like to learn all aspects of it.

Please let me know if you can help me, thanks a bunch!
 
Old 09-20-2005, 09:16 PM   #2
danimalz
Member
 
Registered: Jul 2005
Location: West Coast South, USA
Distribution: debian 3.1
Posts: 267

Rep: Reputation: 36
Many people, including me, have done this quite easily..! And it's indeed a good
project that will help u in your class.

I have an old pentium1 200mhz 32Kram computer installed with linux (debian). It has two NICs, one is attached to a dsl modem and get's it's ip address via dhcp from my isp (verizon). The other nic is cabled into a six port network hub. Thusly, I can connect other computers (windows, mac, linux, doesn't matter) to the network hub and have a very simple local 'network'. Since i have only a few additional machines, i assign IP addresses to all of the lan-side nics myself

The old linux box has been upgraded with additional storage, but nothing else. It doesn't even have a monitor attached (this is called 'headless' in net-speak). It acts as a firwall, internet gateway, and file server (using 'samba'). Despite being such an 'old' box, it runs perfectly, silently, and is more than enough to support the services i need.

All of the above was accomplished by searching the net for resources and reading howtos and tutorials on my own. Some suggestions are obviously google, and also www.tldp.org, www.debian.org (there are many others).

If you already have the computers available to you, then use the newer, faster computer for the firewall/gateway. You'll want to use the more capable machine for your desktop, obviously.

If you only want to connect two computers, then you wont even need a network hub, you can simply connect the 2nd nic on the gateway machine directly to the nic on your desktop machine, but you will need a 'crossover' cable rather than a standard ethernet cable.

Hope this helps
 
Old 09-21-2005, 06:59 AM   #3
gibran
Member
 
Registered: Jul 2005
Location: California
Posts: 36

Original Poster
Rep: Reputation: 15
What is it specifically called that im looking for through google? (Thats why i cant find anything)
 
Old 09-21-2005, 11:39 AM   #4
danimalz
Member
 
Registered: Jul 2005
Location: West Coast South, USA
Distribution: debian 3.1
Posts: 267

Rep: Reputation: 36
google, try:

linux home networking
linux home networking howto
linux networking howto
linux windows networking
linux gateway server howto
linux gateway server
internet gateway howto
internet gateway server linux
linux networking tutorial
...

...


mix it up, eventually you'll find something.
 
Old 09-21-2005, 11:45 AM   #5
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Some basics that will help you with this configuration. If you are running a small network it is often easier to configure everything with static addressing.
The two cards must be on different subnets in order for the system to work. Let's look at the practical application of this.;
If eth0 is connected to a modem/router that has an ip address of 10.0.0.10 then it must also use the same subnet. You can for example give eth0 an address like 10.0.0.2 in /etc/network/interfaces. The gateway for the box would be 10.0.0.10.
eth1 must be on a different subnet so give it an address like 192.168.0.2 in /etc/network/interfaces.
Now boxes connected via eth1 can use the eth1 ip address as the gateway (192.168.0.2).
You need protection , filtering as well so it is best to implement an iptables firewall and ip-masquerading on the box in order achieve security and sharing.

Last edited by TigerOC; 09-21-2005 at 11:47 AM.
 
Old 09-21-2005, 06:46 PM   #6
gibran
Member
 
Registered: Jul 2005
Location: California
Posts: 36

Original Poster
Rep: Reputation: 15
awesome thanks alot guys.
i remember overhearing something about iptables and firewalling between somebody, so i figured routing the connection through the box had a seperate component name to networking as a whole, thats why i thought i should ask about what i should search for.

Thanks alot!
 
  


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
A Newbie Trying to network eaterofsmoke Mandriva 8 01-28-2005 05:55 PM
Network help for a newbie! loserpunk603 Linux - Networking 4 08-09-2004 12:00 PM
Newbie needs help with network please. Maranello Linux - Networking 6 08-09-2003 05:32 AM
Newbie trying to network LinuxNewby15 Linux - Networking 2 07-17-2003 10:26 AM
Newbie wanna setup up a linux network on existing home network... marvc Linux - Networking 3 03-19-2003 09:02 PM

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

All times are GMT -5. The time now is 09:08 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