Click to See Complete Forum and Search --> : Networking problem


FrostX
09-16-2002, 05:37 PM
I've got Apache running to the point that I can grab port 80 from localhost, I can ping it from another machine, but I can't seem to pull up the page from another machine. Could I just be stupid?
(e)

element-x
09-16-2002, 07:25 PM
Is your ISP filtering port 80?

FrostX
09-17-2002, 10:18 AM
Actually, I am the ISP. The firewall's on the other side of the network I'm working on.

war
09-17-2002, 02:41 PM
this other machine and your apache server on the same segment ?

FrostX
09-17-2002, 06:17 PM
Not physically, but for all intents and purposes, yes. I think there's 3 hubs/switches, but we are running around 600 IP addresses in the building, so it's tough to follow cabling. Physically, it's good. The problem is somewhere else, otherwise PING would fail.

Supa' Penguin
09-20-2002, 03:34 PM
Hello,
So you can localhost your test page right.

are u using name or ip based v-hosts?
While your in your apache.conf what interfaces are you binding to?
(look for listen and bind directives)(* means all available)
then check your tcp/wrappers rules. /etc/hosts.allow and /etc/hosts.deny

let me know
J.

FrostX
09-20-2002, 04:15 PM
Over my head... I just threw linux up on the machine. I think I need someone to hold my hand through setting up gateway and dns servers. I don't think I got em right, cuz I can't surf on it.
Thanks

Supa' Penguin
09-23-2002, 12:47 PM
Good morning,
I hope u had a great weekend! :)

Which dist. are u using? RedHat?

Do you have a functioning DNS server to resolve with?
if so add it's ip to your /etc/resolv.conf as nameserver <ip>
and add your name resolving to your ip on the DNS server.
Ping using the linuxbox's name from another comp.

If you intend to have this function as a DNS server, you must setup BIND.(look on www.tldp.org bind-howto) and then ask 4 some help. If using Redhat, the GUI is really easy and fast 4 a basic setup.

Now with regards to the gateway,(look on www.tldp.org networking overview-howto) u must set the default gateway 4 your interface. route --add default gateway <gw ip>. Using RH, just add the ip to /etc/sysconfig/network under the gateway=<gw ip>.

list your assigned routes. route

now try to bring up a webpage or ping using a name that's external 2 your network. (some sites do not respond to ping).

Once completed let me know.

:)
J.

FrostX
09-23-2002, 01:11 PM
Both nameserver and gateway were already there, in the files you specified in the last post... Guess I didn't screw up that bad... heh. I just added an A record in the DNS server for it, but unfortunately, I have to leave it unplugged from the network for a few, because I need to have a server up on the cable it's on, and I'm too lazy to make another one. But anyway, I went to samspade.org and looked it up, and it found the domain just fine, but not the host. I'm wondering if I screwed up the A record, or I just need to have the thing plugged in. But anyway... Wouldn't I theoretically be able to surf without an A record on the DNS server?
(e)

Supa' Penguin
09-23-2002, 02:10 PM
Hello again,

Ping or telnet to another host on your internal network, Do you get a response? (this tells u if your ip and netmask are correct)

Ping the Gateway.

You are correct u don't need an A rec. But u do need a DNS server to resolve from. add it's ip to your /etc/resolve.conf and set your default gw so you can access anything not in your subnet.

Your post is in regards to apache so you must have some sort of name resolution to find your site.

J.
:)

FrostX
09-23-2002, 02:27 PM
Yes, the linux box pings everything just fine by IP, but not by name, which makes name resolution on the internet a little difficult. Does it make any difference that the DNS server is NT4? I can't imagine why, but I'm throwing ideas out now... I don't have a WINS server up either... but that shouldn't matter, should it?

Update: Got pissed and plugged the linux box back in. Now I can ping it's FQDN, with the A record in the DNS server. I didn't try surfing, cuz 30 seconds is a long time to have the other server offline for now... I guess I'll screw around again in a little bit, once I can have the linux box online.

(e)

Supa' Penguin
09-23-2002, 02:44 PM
SET YOUR /etc/resolv.conf as nameserver <ip>

FrostX
09-23-2002, 02:49 PM
It was already there from when I installed the OS, and I couldn't get out before.

FrostX
09-23-2002, 04:57 PM
OK, Narrowed it down more. I can't ping yahoo.com by IP address. I'm on a 22 bit network (10 bit host addresses). Gateway is *.*.*.1, and DNS server is *.*.*.2. Obviously those aren't the exact numbers. I think that I just can't get out of my network period, although the other machines on my network can't get to the apache server on that machine either. Mebbe I should be taking this to a networking board...
(e)

The Whizzard
09-23-2002, 05:06 PM
Originally posted by FrostX
OK, Narrowed it down more. I can't ping yahoo.com by IP address. I'm on a 22 bit network (10 bit host addresses). Gateway is *.*.*.1, and DNS server is *.*.*.2. Obviously those aren't the exact numbers. I think that I just can't get out of my network period, although the other machines on my network can't get to the apache server on that machine either. Mebbe I should be taking this to a networking board...
(e) Seems to me like a subnetting issue. Make sure you have the correct subnet mask in you network configuration.

FrostX
09-23-2002, 05:09 PM
255.255.248.0

Supa' Penguin
09-24-2002, 12:16 PM
Sorry 4 not getting back sooner.

Thanks Wizzard this is difficult to determine with ping.

FrostX please read www.tldp.org networking overview-howto.

then bring up your interface settings with ifconfig

ensure that you are in the correct subnet and your bcast is correct for your subnet.

ping the GW and DNS and then read my previous posts.

don't forget read www.tldp.org networking overview-howto.

J.
:)

FrostX
09-24-2002, 12:57 PM
After review of the GW and DNS servers, I realized that they are on different subnets. I've got a secondary DNS server on that subnet as well, which I will be implementing later today. Now I just have to figure out how to get the thing to talk to a gateway on a different subnet...

Supa' Penguin
09-24-2002, 02:23 PM
Configure both your GW and your linux box with a b-class bcast.

FrostX
09-24-2002, 02:39 PM
You got me lost. I only know windows networking, and I'm not all that experienced in it at that. Anyway, the subnet mask I'm running is 21 bit... (255.255.248.0) I think I said 22 earlier, which is NOT right. The conversion to binary is tough for a guy that did as many drugs as I did in high school...
Anyway, where do I go to try that?

Supa' Penguin
09-24-2002, 02:56 PM
An example 4 a b-class bcast of the 192.168.X.X address range

0.0.255.255 will allow transfer to all addresses in the range of 192.168.0.1 - 192.168.254.254 (255 is used for broadcast(dhcp request is common)).

Set this on both your GW, DNS and linux box to allow them to communicate.

FrostX
09-25-2002, 09:51 AM
The problem here is that I'm not just running a little home network. I'm working on a professional network. I can't just start changing stuff and expect anything to work. I need to match the linux box to the current network topology, with no changes to anything else besides entries to the DNS server, etc.

Supa' Penguin
09-25-2002, 10:25 AM
Then setup a slave DNS on the linux boxes subnet.

FrostX
09-25-2002, 10:37 AM
OK, I have DNS working. I can look up a domain on a local server, however, the gateway is still on another subnet, so nothing is going outside of the local network.

Supa' Penguin
09-25-2002, 12:21 PM
Setup an ip aliase for your interface card to allow your box access to that subnet. ie. eth0:0 192.168.0.1 eth0:1 192.168.1.1

FrostX
09-25-2002, 12:22 PM
Hrmm... Good idea. How does a linux newbie such as myself go about setting that up?

Supa' Penguin
09-25-2002, 12:37 PM
/sbin/insmod /lib/modules/`uname -r`/ipv4/ip_alias.o

/sbin/ifconfig lo 127.0.0.1
/sbin/ifconfig eth0 up
/sbin/ifconfig eth0 <primary ip>
/sbin/ifconfig eth0:0 <2nd ip>

/sbin/route add -net 127.0.0.0
/sbin/route add -net <subnet one> dev eth0
/sbin/route add -net <subnet two> dev eth0:0
/sbin/route add -host <primary ip> eth0
/sbin/route add -host <2nd ip> eth0:0
/sbin/route add default gw <GW IP>

check with vi /proc/net/aliases

FrostX
09-25-2002, 12:40 PM
So I'm typing each of those lines into the command prompt? Or are these in a config file of some sort?

Supa' Penguin
09-25-2002, 12:59 PM
enter to unsure that they work.

Then put in a script to be executed on every boot(with out the vi statment).

FrostX
09-25-2002, 01:49 PM
I'm sorry, I don't understand what you mean. Remember, I'm a linux retard...

Supa' Penguin
09-25-2002, 02:20 PM
What dist R U using? Suse, Mandrake, TurboLinux, RedHat?

FrostX
09-25-2002, 03:02 PM
RedHat Dist. 7.2. The kernel is whatever came with it.

Supa' Penguin
09-26-2002, 11:56 PM
paste in /etc/init.d/rc.local to take effect on every boot