PDA

View Full Version : Can Someone Point Me to an Idiots Linux Networking Site?



Hobo
03-18-2002, 09:24 PM
I'm having a little trouble and I've spent the last 3 1/2 hours searching and trying different things. Basically here's the deal...

I just got DSL up and running today. I confirmed that it works by running it straight to my Win98 box. I've installed a new NIC in my Redhat 7.0 box but for the life of me I can't seem to figure out how to one, get the RH Box to *see* the internet, and two, get it properly networked to my Win98 box.

I want to use the RH box as my server and firewall and then network 4 other WinXX machines to it and let all of them have internet access via the DSL connection on the RH box.

Can someone point me to an EASY to understand site that explains step-by-step how to set this type of network up?

So far I think I've got it figured out that I need to set either eth0 or eth1 (probably eth0) to connect to my DSL modem. My ISP uses a dynamic IP so I *think* I need to use DHCP on eth0 as I cannot set up a static IP with a submask(?) of 255.255.255.0. Am I on the right track here?

Also, I'm fairly certain I should be setting up my other NIC (eth1) as a static IP of 192.168.0.1. Does this sound right?

I've been running SEQ via dial-up for quite sometime but now I need to learn how to set it up for DSL. My biggest problem seems to be figuring out how to set up the NIC's. Things like the what the proper commands are, how do I use the RH Network Configurator to set these things up, and so on.

I sure appreciate ANY help you can offer and any links you might have to show this idiot, how to make this work.

Thanks!


Hobo

high_jeeves
03-18-2002, 11:01 PM
www.linuxnewbie.org
www.linux.org

Two good sites to get started.

--Jeeves

genius
03-19-2002, 12:31 AM
There are websites out there that deal with Linux networking directly. I will search around for one tomorrow when I get off of work and post it here.

And for the person replying the answer to every question regarding Linux is not


www.linuxnewbie.org
www.linux.org


Just my personal opinion though :Þ

genius
03-19-2002, 12:35 AM
Well was bored and did a simple search in google for "linux networking newbie". Here is what I came up with:

http://www.linuxlinks.com/Networking/

and specifically on that page would be:

http://www.acm.org/crossroads/xrds6-1/linuxsec.html

Just a few helping sites. Try to do all the research you can and then ask your question if you think you absolutely cannot find the answer.

high_jeeves
03-19-2002, 01:11 AM
well genius, excuse me for not doing a google search for some idiot who cant do it for himself. He wanted linux sites, I posted the ones I knew, which I know have networking information on them.

ALL BOW DOWN TO GENIUS, GOOGLE MASTER! (No wonder he's a genius, I always was confouded by that complex google system!)

--Jeeves

Hobo
03-19-2002, 07:46 AM
"...excuse me for not doing a google search for some idiot who cant do it for himself. "




Ouch, I may call myself an idiot but give me a break will ya? :) First to clarify a couple things.

1. I can and I did do a Google search. Several in fact. Best thing I could find was a HowTo that didn't give me the info I needed.

2. Rather than continue a fruitless effort I thought I'd come to the most knowledgable source that I know of for SEW and Linux Networking...this site.



Now, if I may, I'd like to continue with some additional information in the hopes that you guys can help me. here is where I am stuck...

Using RH 7.0


I removed both NIC cards, rebooted and when the Hardware Configuration utility came up I chose to REMOVE both NIC's from the configuration. Then after the boot I halter, shutdown and installed both cards. Then when I reboot the Hardware Configurator comes up again.

I can go through the configuration routines but they are still screwed up after boot. So I'm trying to configure them manually through the Network Configurator in Gnome.

When I go to set up my NIC for the NETWORK all seems to go well. I set it up as a "static IP" of 192.168.0.1. I can then ping my Win98 box at 192.168.0.2 and my Win98 box can ping my RH box. However, when I go to set up my other NIC card I can't seem to get it right. Since I have a dynamic IP I assume that I need to use DHCP instead of a static IP. Is this correct?

When I do set it up as DHCP I can't put in an IP. I also can't seem to figure out how to set the default Gateway. If I have a dynamic IP, how can I say my default Gateway is xxx.xxx.xxx.xxx? I have no idea what this IP is going to be. I also am not clear on how to set up (or add in) my DNS server IP's, which I assume I need.


So basically to sum it all up here is what I have:

Win98 Machine

Set up essentially the same as it was for dial-up through the RH box. IP set to 192.168.0.2 subnet 255.255.255.0. Gateway is 192.168.0.1 (RH box) and DNS server is set to my ISP's primary and secondary DNS servers.


RH Machine

One NIC (eth0 I believe) is set up as a static IP with 192.168.0.1.

2nd NIC (eth1 which is connect to my DSL modem) not properly configured because I need to use a dynamic IP (DHCP?)



So you see my problem doesn't seem to be easily answered by the HowTo's or other Linux Networking sites. I haven't found anything that tell how to set up the Linux box NIC's for DSL usage while using a dynamic IP. I did find instructions on how to do it manually in a terminal window using a static IP, but that hasn't helped me due to my dynamic IP needs.


Thanks again!

Hobo

high_jeeves
03-19-2002, 09:00 AM
Hobo:

Sorry, I was more pissed at this "genius" prick, took it out on you.

Here are two sites I found that might help:

http://www.linuxdoc.org/HOWTO/Net-HOWTO/
http://www.linuxdoc.org/HOWTO/mini/DHCP/

As for DHCP, it is what you need to use, it will assign all network related properties (IP Addr, Gateway, DNS servers, etc).

You will also have to setup IP Masq to use your Win box through your linux box.

Check this thread:

http://seq.sourceforge.net/showthread.php?threadid=566 (See, search really is our friend).

--Jeeves

Hobo
03-19-2002, 09:55 AM
Thanks Jeeves, I really took no offense. I've been on your side of the fence many times, trying to help "idiots" that seem like they aren't even trying to help themselves. :)

I've ran SEQ for quite some time but it's always been with a dial-up connection to my SEQ box. What is totally confusing me is setting it up with a DSL connection and DHCP. If you don't mind I'd like to hit you up with another question or two before I start reading through the links you just provided me.

1. Would it be smarter, easier, etc., etc., for me to just go buy a hardware firewall/nat router? I know I will still need to figure out how to connect my RD box to this router and then my Win98 box to the RH box, AND make it all work just as I am now. However, I'm wondering if the overall scheme is easier to get up and running if I use a hardware firewall/nat router. Sounds like in the long run it is better because it prevents you from bringing down the whole network when I need to reboot the RH box.

2. If the answer to #1 is "yes", what hardware firewall/nat router would you recommend?


Now with that said I'll give you some more info and then I am off to check your latest links. So far I've tried every link listed here but still not found quite what I'm looking for. Specifically the commands to set up my RH box to use DHCP (dynamic IP) on the ethX card that is connected to my DSL modem. mY commands don't seem to be working or I'm ommiting something.

I tried and tried and tried last night but no go. Can't surf from Netscape on RH Box. Basically in the Gnome Network Configurator my ethX card (I think it's eth0) is configured as a static IP of 192.168.0.1, subnet of 255.255.255.0. I can ping my Win98 machine at 192.168.0.2. My Win98 machine can ping my RH box at 192.168.0.1.

My other ethX card (eth1 I believe) needed to be set up. Sooo...using the Gnome Network configurator I set it up to DHCP by clicking on the "edit" button and following the steps. AT this point it shows as "inactive". When I click on "activate", it then goes "active".

At this point I try to surf the net with Netscape on my RH box and it doesn't work. (Tried surfing from Win98 machine too and it didn't work either, as I expected.)

Common sense tells me that I am missing the command(s) to tell the RH Box to use the eth1 card to access the internet. By the same token it seems I am missing the command(s) to make the eth0 NIC route through the eth1 NIC to access the internet.

I'm 99.9% certain I've applied forwarding and masking properly. The commands I've used are ifconfig, ip_forwarding, DENY and MASQ by following a guide provided by WHitfire some time ago on the old HQ's board. I felt it should still apply as it is for networking only and I am still using RH 7.0 and an older SEQ version. Just for info I've included a cut-n-paste of Whitefire's guide, just keep in mind that his guide is for static IP's from your DSL provider, whereas I need info for dynamic IP's, which is why I am trying to use DHCP. Whitefire's Networking Guide...


Connecting to Internet via DSL, Cable Modem, or LAN Connection with Firewall
There are a couple of different ways to configure your network to make ShowEQ work with a LAN Internet connection. The first one I will go over is the one I like best and that is setting up the Linux Box as a firewall. Doing this will allow you to add more computers to your network at home and put them on the internet without having to purchase more IP address from your ISP.

Equipment Needed:
1. 3 NIC Cards (One for the Windows Machine, 2 for the Linux Box)
2. 1 HUB and 3 Patch Cables OR 1 Crossover Cable.
3. Internet connection already in place (i.e. Cable Modem, DSL, T1

Steps:
1. Install 2 NIC Cards in the Linux Box and 1 in the Windows machine.
2. From the Second NIC Card in the Linux Box (eth1) connect a patch cable and plug the other end of it into the Hub or use the crossover cable and go from NIC to NIC.
3. Connect the other NIC card (eth0) in the Linux Box to the Internet using another patch cable and plug the other end of it into the Cable Modem, DSL Modem or what ever device you might have.
4. Configure the first NIC card in the Linux Box (eth0) with the settings provided by your ISP. In Redhat you can change these settings from the command prompt y typing “#ifconfig eth0 xxx.xxx.xxx.xxx 255.255.255.xxx”. The x’s will be replaced with data from your ISP. That will give the NIC card its IP address. Now we need to install the gateway. Again at the command prompt type “#route add default gw xxx.xxx.xxx.xxx”. The x’s here being the Default Gateway your ISP provides. You can also insert a host name here instead if you have the IP address in your /etc/hosts file. Lastly you need to give the Linux Box the address of a DNS server. Do this by editing the /etc/resolv.conf file. From the command prompt type “#vi /etc/resolv.conf”. This will open the /etc/resolv.conf in the VI editor. Now you need to add an entry if there is not one there. For example “nameserv 24.4.48.33” would go on the first line. Save the file and exit VI.
5. Configure Second NIC in the Linux Box (eth1) for your home network. We will assign it the IP address of 192.168.0.1. To do this type “#ifconfig eth1 192.168.0.1/24” at the command prompt.
6. Turn IP Forwarding on. To do this in Redhat the command is “#echo 1 > /proc/sys/net/ipv4/ip_forward”.
7. Because this type of configuration is always connected to the Internet I like to add TCP Wrappers as an added means of security. To do this edit the /etc/hosts.deny file. At the command prompt type “#vi /etc/hosts.deny” and add the line “ALL:ALL” to the file. To get these changes to take effect you will need to restart the inetd daemon on your system.
8. Now create the rule to allow the packets to travel from one network device to the other. Creating ipchains rules does this. From a command prompt in Redhat this is done by typing “#ipchains –I forward –s 192.168.0.0/24 –d 0/0 –j MASQ”. This command will allow any computer on the network with a 192.168.0.xxx IP address to go anywhere on the Internet.
9. Configure the NIC card on the Windows machine. Right click on “Network Neighborhood” and select properties. Find the TCP/IP stack that is bound to your NIC card and click the properties button. Select the option that says, “Specify an IP Address” and give it the IP address of 192.168.0.2 with a subnet mask of 255.255.255.0. After you have finished that click on the Gateway Tab. You want to give it the IP address of the NIC card on the Linux Box of 192.168.0.1 and hit the add button. Last click on the DNS tab and give it the IP address of a DNS server. If you do not know the IP address of one call your ISP they can give you theirs or you can use 24.4.48.33, 24.4.48.34, 24.4.48.35, 24.4.48.36. These are all working AT&T DNS server. You only need to install one of them, but I usually install 2 just in case one goes down.
10. Reboot the Windows PC and you should be good to go.


**********************************


Sorry for the incredibly long length here but I wanted to give as clear a picture as I possibly could. I am now off to research the links you gave me.

Thanks!


Hobo

Mr Guy
03-19-2002, 10:31 AM
I'm going to break my own cardinal rule of "Read the whole post before responding"


1) No, it would not be easier or better to pay extra money for firmware when Linux software will do it just fine.

2) I recommend IPTables to handle your routing needs


I did this on a cable modem for mandrake, but I'd imagine the process is very similiar for redhat, what with them being kissing cousins and all.

Make sure you have a package similiar to dhcpcd-1.3.20pl0-1mdk installed.

You'll need to do two things: Set ethX to DHCP (with linuxconf or whatever) and bring the card up. U ntil you bring the ethX card up, it won't go get it's DHCP info.

Do you get a message like
Bringing up eth1 [FAILED]
Time out

Or (desirably):
Bringing up eth1 [PASSED]


My other thought is that since you had it before on a dial up, you may have your firewall set up to force requests through ppp0. Check your firewall script (mine is in /etc/rc.d/rc.firewall) and change any ppp0 to ethX.

Hobo
03-19-2002, 10:45 AM
Thanks Mr Guy. Both good thoughts and ideas. I will check the firewall info when I get home. Bringing up the EthX card is done by using what command? I know it's done by ending the command with "up" for turning it on and "down" for turning it off. I just don't remember the rest of the command.

Thanks,

high_jeeves
03-19-2002, 12:29 PM
Also, after bringing eth1 up with DHCP, run ifconfig (as root, of course), and post what it shows under eth1. If it shows a valid looking IP addr, then DHCP is working, and the issues are related to routing. If you dont have a valid IP addr, then DHCP is still your issues.

--Jeeves

Mr Guy
03-19-2002, 01:34 PM
try 'ifup eth1'

Hobo
03-19-2002, 01:39 PM
Jeeves,


I've tried running ifconfig (did it last night) and the only things that came up were lo and ethX (think it was eth1, but it was the one that connects to the hub, not the DSL modem). The other ethX didn't show up all which leads me to believe either a) it's not "up" and running or b) I haven't configured it properly. Comments?

As usual...Thanks!


Hobo

high_jeeves
03-19-2002, 01:47 PM
If it isnt listed in ifconfig, then yes, it isnt up.. try Mr Guy's sugestion (ifup eth1), then try ifconfig.. see if you get something then. If not, it is a network/DHCP configuration error. You sure your DSL doesnt use PPOE? Does it require special drivers to run under windows, or is it just supposed to plug into the network anywhere?

--Jeeves

Hobo
03-19-2002, 01:52 PM
No, my DSL service does not require any special software or drivers. I also know it is working because I can plug it directly into my Win98 machine, do a few changes in Network Neighborhgood and surf the net just fine. So it's definitely something I'm not doing properly in Linux.

I'm going to try a few different things in a couple hours, based on the inpout here and reading on the links you guys provided. I may also go out and get a HW router and try the setup that way as I think it'll keep the rest of the family happy. (Network won't be down while I'm working on SEQ.)


Hobo

Mr Guy
03-20-2002, 09:54 AM
First try ifup and tell us what it says.

Since you don't remember what order your cards are, I'll call them ethHUB and ethDSL

Then try this:

Swap the cables on your ethernet cards. You KNOW ethHUB works with your driver setup on linux, but we are not yet convinced your ethDSL works. Swap the cables, and use linuxconf (or equivalent) to plug in the old values from ethHUB to ethDSL.

Then you need to bring the cards back up (which linuxconf will do for you usually). If you can still ping back and forth from linux to windows, then your ethDSL card is acceptable. If not, blame the card.

On a side note, run 'rpm -qa| grep dhcp' and tell us what it says.