LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   outside of the network? (https://www.linuxquestions.org/questions/linux-networking-3/outside-of-the-network-36708/)

eoflores 11-28-2002 06:55 AM

outside of the network?
 
Hi all!

I am fresh newbie. Just got RH 8.0 Personal and after several trial & error installations got it working. I know probably my questions has been asked before but I am new as in new so I wish to ask this one.

How can the RH box to share the internet?

Now that I got it working how can I make the other boxes use the INTERNET. Only the RH box is connected via DSL there are two cards in the box but only one is recognized during boot eth1 the eth0 remains ? pppoe connects fine, the remaining boxes have no access to internet services.

It would be greatly appreciated if someone could put me on the right track.

Thank you in advance!

acid_kewpie 11-28-2002 06:59 AM

"share" meaning allowing internal machines to use this box as a gateway? yes, that has been asked shiploads of times. but generally speaking you want to read up on "ip masquarading" or "ip forwarding" you can get an iptables firewall to do it for you easily enough. i let a front end called firestarter to set up both a frewall and ip forwarding automatically for me.

eoflores 11-28-2002 09:14 AM

Yes, Chris.

I realize that this question may had been asked many times and it may come around again by other newbies., that unless some one puts out a good dinitive resource where no stories are told only the direct line to the info.

I've been all over the net looking for a kind of down-to-earth guide have hardly found nothing. I'll take a look at the two sources you mentioned I am sure I'll have lots of interesting reading to do.

Anyway, I've been doing some experimenting of my own and I loaded an rpm with a dhcpd server then wrote up the following dhcpd.conf that I found in a book and by trial and error got the dhcpd to work, but the client side don't quite connect yet. Can you please provide me with some input. Thank you.

default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address-192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name "mytruedomain.com";
ddns-update-style ad-hoc;

subnet 192.168.1.0 netmaks 255.255.255.0{
range 192.168.1.56 192.168.1.76;
}

acid_kewpie 11-28-2002 09:30 AM

well dhcp is very much detatched from your current siutation, and not relevant yet. you mentioned that you havne't got the second interface working on the gateway yet, so that's the priority. have you tried setting it up with netconfig or a similar configuration app? this internal interface will generally have a static address, unless you really want to get a dhcp from yourself, which is a bit more complicated. have a look at the network howto at tldp.org to help get that second interface running.

eoflores 11-28-2002 04:44 PM

Thank you Chris.

I'll take a look at the tldp.org and I'll get back to you on this.

bleah-man 11-30-2002 04:38 PM

dhcp on RedHat
 
Ello...

I have had a little bit of experience with this.

RH 8 Comes with dhclient which is a very cool program. You can run dhclient and specify an interface to configure. Like if your 'internet' NIC is eth0 then you can: dhclient eth0 This makes life a little easier because it doesn't configure your other interface, eth1 I presume. You will have to dhclient eth0 each time you boot up, unless some bright spark on here can advise on how to run dhclient with parameters from rc.

Now you just got to set a static IP for eth1. May I suggest a class C address in the 192.168.0.0/255.255.255.0 range, eg 192.168.0.1/255.255.255.0 for your 'internal' network card.

As stated in previous replies let firestarter take care of your NAT etc... Now all you have to do is configure your other boxes to use 192.168.0.1 as your gateway interface and set them with IPADDR's within the same subnet as your internal card. Such as 192.168.0.10/255.255.255.0

In firestarter options make sure that in the advanced NAT option you enter the range of IP's supported internally, you can do this by typing 192.168.0.0/24

Now physically you should have one cat5 from your internet router to your eth0 card. Then another cat5 from your eth1 card to your hub (I like switches better though) then connect all the other computers to your hub.

Should work a treat.

If you are only using one linux box and one other box you could connect the two with a X-over cable, just a different wiring job.

Hope that was alright, good luck

bleah-man

eoflores 11-30-2002 06:26 PM

Bleah-man,

Thank you for your reply it puts me right on track.
;)


All times are GMT -5. The time now is 11:38 PM.