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 01-16-2004, 11:29 AM   #1
Zero-0-Effect
Member
 
Registered: Sep 2002
Location: Texas
Distribution: SlackWare - Current LFS - CVS
Posts: 267

Rep: Reputation: 31
Problems connecting to www sites, can ping address though.


Ok my hardware layout is as follows:
This is just a small home network more to learn how networks work.
Internet-->Modem-->eth0(RedHat box) eth1(RedHat box)-->Router-->clients

Ok I got dhcpd running on the redhat machine and the client computers can get a dynamic IP from it using eth1. I got my dsl modem setup and running under eth0.
How do I tell it to allow the client computers to access eth0 for internet access, afriend told me something about /etc/default/dhcp. He said put the line INTERFACES=" eth0 eth1". Is this what needs to be done or is this more complicated?

/etc/dhcpd.conf
Code:
option domain-name "localdomain";
option domain-name-servers localhost.localdomain;

option subnet-mask 255.255.255.224;
default-lease-time 999999;
max-lease-time 999999;

subnet 192.168.123.0 netmask 255.255.255.0 {
  range 192.168.123.100 192.168.123.199;
  option broadcast-address 192.168.123.254;
  option routers 192.168.123.254;
}

ddns-update-style ad-hoc;
To show this works heres the output from the dhcpd -d running...
Code:
[root@localhost root]# dhcpd -d
Internet Software Consortium DHCP Server V3.0pl1
Copyright 1995-2001 Internet Software Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP
Wrote 0 leases to leases file.
Listening on LPF/eth1/00:50:ba:c8:5d:d6/192.168.123.0/24
Sending on   LPF/eth1/00:50:ba:c8:5d:d6/192.168.123.0/24
Sending on   Socket/fallback/fallback-net
DHCPREQUEST for 192.168.123.128 from 00:30:bd:05:ae:48 via eth1
DHCPACK on 192.168.123.128 to 00:30:bd:05:ae:48 via eth1
As you can see it is giving out a IP address to my other computer but I can access internet.

Any help or just pointing me to the right man page would be appreciated.

Already read the dhcpd.conf page and dhcpd page.

Last edited by Zero-0-Effect; 01-17-2004 at 12:28 PM.
 
Old 01-16-2004, 11:38 AM   #2
95se
Member
 
Registered: Apr 2002
Location: Windsor, ON, CA
Distribution: Ubuntu
Posts: 740

Rep: Reputation: 32
what is the address of your main comp?
option routers x.x.x.x
specifies which comp to use as a gateway. i saw somewhere to use x.x.x.254, but this didn't work for me and i changed it to 192.168.0.1 (the address of the main computer)
I also have my broadcast address as 192.168.0.255.
 
Old 01-16-2004, 12:01 PM   #3
Zero-0-Effect
Member
 
Registered: Sep 2002
Location: Texas
Distribution: SlackWare - Current LFS - CVS
Posts: 267

Original Poster
Rep: Reputation: 31
The dhcp server itself works, I can get network access to other computers but I can not get internet access through my Rh machine.

Im not at my comp at the moment and do not know its IP.
I thought it would be 192.168.123.0??
The router address is the IP I assigned to my router to use.
 
Old 01-16-2004, 03:45 PM   #4
95se
Member
 
Registered: Apr 2002
Location: Windsor, ON, CA
Distribution: Ubuntu
Posts: 740

Rep: Reputation: 32
wait, your using a router? That should have a dhcp server, and handle everything for you, i don't know why your setting up a dhcpd on your redhat box.
 
Old 01-16-2004, 04:29 PM   #5
Zero-0-Effect
Member
 
Registered: Sep 2002
Location: Texas
Distribution: SlackWare - Current LFS - CVS
Posts: 267

Original Poster
Rep: Reputation: 31
Yes i know it has a dhcp server on it -- It works great that way, had it like that for bout a year now and want to learn how to setup a dhcp server and possibly a filter and firewall.

I dont want to use it... as I said before im setting this up to learn about networks stead of just plug in a wire and let it do everything for me.

Currently the router is acting more as a hub or switch, the dhcp server and special apps server all that extra crap is turned off.

I want to know how I would set it up so that when another computer tries to access a webpage it goes computer-->router-->RHbox (eth1)-->RHbox(eth0)-->modem-->internet

The part between eht1 and eth0 is what I dont have working. Internet works on RHbox and dhcp works too, my other computers are recieving IP address but I can not view webpages.
Is there a way to test to see if I can access say just the RH machine (not the web yet) to make sure it really is connecting?

Edit:

After booting up my 2k machine I got this message (it gave it a IP address) DHCPINFORM from 192.168.123.171 via eth1: not authoritative for subnet 192.168.123.0

Edit 2:

Everytime I try to access the internet using trillian or internet explorer on 2k and xp machines i get this same errror or statement:
DHCPINFORM from 192.168.123.128 via eth1: not authoritative for subnet 192.168.123.0

Edit 3: Put authoritative; at top of config file and dont recieve that message anymore but still can access web pages.

Last edited by Zero-0-Effect; 01-16-2004 at 05:54 PM.
 
Old 01-16-2004, 07:10 PM   #6
Zero-0-Effect
Member
 
Registered: Sep 2002
Location: Texas
Distribution: SlackWare - Current LFS - CVS
Posts: 267

Original Poster
Rep: Reputation: 31
Updated my config file

Code:
option domain-name "localdomain";
option domain-name-servers localhost.localdomain;

option subnet-mask 255.255.255.0;
default-lease-time 999999;
max-lease-time 999999;

authoritative;

subnet 192.168.123.0 netmask 255.255.255.0 {
  range 192.168.123.100 192.168.123.199;
  option broadcast-address 192.168.123.255;
  option routers 192.168.123.1;
}

ddns-update-style ad-hoc;


Still no web acess
 
Old 01-16-2004, 07:48 PM   #7
95se
Member
 
Registered: Apr 2002
Location: Windsor, ON, CA
Distribution: Ubuntu
Posts: 740

Rep: Reputation: 32
Make sure you set up nat with iptables aswell:
http://www.e-infomax.com/ipmasq/
If you run route (as root) it should show your default gateway as your RH box.
 
Old 01-16-2004, 07:55 PM   #8
Zero-0-Effect
Member
 
Registered: Sep 2002
Location: Texas
Distribution: SlackWare - Current LFS - CVS
Posts: 267

Original Poster
Rep: Reputation: 31
Code:
adsl-##-##-##-##               255.255.255.255 UH    0      0        0 ppp0
192.168.123.0   *               255.255.255.0   U     0      0        0 eth1
169.254.0.0     *               255.255.0.0     U     0      0        0 eth1
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         adsl-##-##-##-## 0.0.0.0         UG    0      0        0 ppp0
This is what I get running route as root

Before I mentioned eth0.. I should of said ppp0
 
Old 01-16-2004, 10:09 PM   #9
95se
Member
 
Registered: Apr 2002
Location: Windsor, ON, CA
Distribution: Ubuntu
Posts: 740

Rep: Reputation: 32
Read the IP masq. howto, you need this for NAT (what your looking for). Your dhcpd.conf looks fine, so I would go through and setup the IP masquerading and see if it works then.
 
Old 01-17-2004, 10:27 AM   #10
Zero-0-Effect
Member
 
Registered: Sep 2002
Location: Texas
Distribution: SlackWare - Current LFS - CVS
Posts: 267

Original Poster
Rep: Reputation: 31
I will, thanks for the replys and ill get back to you when i finish reading it all. I hope this will get it working.
 
Old 01-17-2004, 11:55 AM   #11
Zero-0-Effect
Member
 
Registered: Sep 2002
Location: Texas
Distribution: SlackWare - Current LFS - CVS
Posts: 267

Original Poster
Rep: Reputation: 31
Ok I was able to get everything up and running and useing linux on my other machine I can access webpages however when I reboot into XP or 2000 I can not get either of them to access webpages ( I dont know much bout settup of networks in XP) however I know the connections are there because I can ping say google.com (using it IP address not the name)
Seems to be a problem with only name address, if I type in the IP I can pull up the page.

My slackware,redhat,debian systems all connect without any problems what so ever and no configuration where altered.

Seems XP and 2K are the problems at this point not my masq (RHbox) server.

My dhpc.conf file is the same as the most recent listed above and my firewall rules for the moment are the default rules listed with the site that 95se gave me. (eth0 was changed to ppp0).

This is what my dhcp server outputs when I connect to it with my XP machine:
Code:
DHCPDISCOVER from 00:30:bd:05:ae:48 via eth1
DHCPOFFER on 192.168.123.155 to 00:30:bd:05:ae:48 (josh-xp) via eth1
if IN A josh-xp.localdomain rrset doesn't exist add 499999 IN A josh-xp.localdomain 192.168.123.155: timed out.
DHCPREQUEST for 192.168.123.155 (192.168.123.1) from 00:30:bd:05:ae:48 (josh-xp) via eth1
DHCPACK on 192.168.123.155 to 00:30:bd:05:ae:48 (josh-xp) via eth1
if IN A josh-xp.localdomain rrset doesn't exist add 499999 IN A josh-xp.localdomain 192.168.123.155: timed out.
DHCPREQUEST for 192.168.123.155 from 00:30:bd:05:ae:48 (josh-xp) via eth1
DHCPACK on 192.168.123.155 to 00:30:bd:05:ae:48 (josh-xp) via eth1
For now I can enter 216.239.39.99 (www.google.com) into the address bar and then search for a page and click its link to view the page but I cannot just type the name in.

Last edited by Zero-0-Effect; 01-17-2004 at 12:45 PM.
 
Old 01-17-2004, 02:43 PM   #12
Zero-0-Effect
Member
 
Registered: Sep 2002
Location: Texas
Distribution: SlackWare - Current LFS - CVS
Posts: 267

Original Poster
Rep: Reputation: 31
Ok I solved my problem...

In Masq server (RHbox) I opened /etc/resolve.conf and copied the two remote server address es and put those in my xp and 2k tcp/ip properties box under use following dns servers.
 
Old 01-17-2004, 04:06 PM   #13
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Does Red Hat have a program to set up internet connection sharing. This should set up NAT and Gateway setting on the Linux box. Then you need to enter your eth1 ip address as a gateway on the Windows boxes. The router may need to be setup with the gateway address also.
 
  


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
Linux can't connect to internet with DHCP through Linksys wired router ruslan40321 Linux - Networking 9 03-30-2008 02:08 PM
Dhcp eth0 and XP eth1 internet sharing props666999 Slackware 8 08-20-2005 09:48 AM
internet via dhcp from a linksys router GeNeSISSIE Linux - Networking 6 11-24-2004 08:36 AM
eht0 vs eth1 conflict CatSC Linux - Networking 7 01-04-2004 03:11 PM
changing eht0 with eth1 slano Linux - Networking 2 12-11-2003 05:13 PM


All times are GMT -5. The time now is 03:41 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration