PDA

View Full Version : Wierd Router/Linux Computer Network problem.


Th0r
08-14-05, 06:56 AM
Right, i have a strange problem, and i don't know how to tackle the situation since i don't know much about Linux based Operating Systems.

Mercury(The linux computers name) has a IP address of 192.168.0.3 on my network, it gets its IP address from the NetGear Router (DG343G). I'm trying to setup a DMZ on the router to forward all traffic to Mercury. Mercury is running Debian 3.1, i thought i should mention that ;)

When i forwarded all the traffic and tried to connect from my DynDNS, i can get to my router web control panel, but when i try ports to my Apache Web server for example, it doesn't work.

So i tried http://192.168.0.3:PORTHERE Which port corrisponds to my Webserver. And that didn't work, but when i tried http://mercury:PORTHERE it worked..

EDIT: I've also tried my SSH port which also doesn't work when using http://192.168.0.3. I don't have a firewall running either, if i did, i wouldn't of been able to connect through as http://mercury:porthere.

Just wondering what i need to do? Thankyou.

fiji
08-14-05, 09:56 AM
so are you trying to access it from the same network as 'mecury' ?

Th0r
08-14-05, 10:38 AM
When i try mercury it works, but when i use the IP address of Mercury(192.168.0.3) it doesn't work. It responds to a ping, but when i try ports and stuff, it doesn't work. And yes, i have checked to see if Mercury does that IP address by using ifconfig and using the routers IP lists which it assigns.

fiji
08-14-05, 03:37 PM
try doing a tracert mercury?

see what ip it give syou

jajmon
08-14-05, 03:48 PM
I bet the issue is that apache is bound to the name of 'mercury' vs the ip address

Th0r
08-14-05, 04:58 PM
try doing a tracert mercury?

see what ip it give syou


You mean the IP address test for my Internet Connection? It says its pasted, but like i said, its happening even inside of my network.

jajmon, even SSH won't work unless i used "Mercury" as the hostname (within side the network aswell as the WAN connection)

This has really got me confused right now on what to do, i'm going away in a few days and i would really like this to be fixed :(

fiji
08-14-05, 06:03 PM
what does your /etc/hosts look like?


tux ~ # cat /etc/hosts

127.0.0.1 localhost tux



ifconfig?



tux ~ # ifconfig
eth0 Link encap:Ethernet HWaddr 00:90:47:05:7B:9C
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:228762 errors:0 dropped:0 overruns:0 frame:0
TX packets:266831 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:159147136 (151.7 Mb) TX bytes:165182903 (157.5 Mb)
Interrupt:10 Base address:0x1000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:9701 errors:0 dropped:0 overruns:0 frame:0
TX packets:9701 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5561484 (5.3 Mb) TX bytes:5561484 (5.3 Mb)




i'm just throwing stuff out here atm... are you absolutely sure 192.168.0.3 is mercury , and not another computer?

have you tried scanning your subnet with something like nmap to check and be sure?


tux ~ # nmap -sS 192.168.1.*

Starting nmap 3.81 ( http://www.insecure.org/nmap/ ) at 2005-08-14 12:58 EST
Interesting ports on 192.168.1.1:
(The 1662 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
80/tcp open http
MAC Address: 00:06:25:B5:4A:11 (The Linksys Group)

Interesting ports on 192.168.1.100:
(The 1655 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
80/tcp open http
139/tcp open netbios-ssn
445/tcp open microsoft-ds
631/tcp open ipp
3128/tcp open squid-http
3632/tcp open distccd

Interesting ports on 192.168.1.101:
(The 1658 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
135/tcp open msrpc
139/tcp open netbios-ssn
445/tcp open microsoft-ds
1025/tcp open NFS-or-IIS
5000/tcp open UPnP
MAC Address: 00:90:47:05:7B:BE (Giga Fast E.)

Nmap finished: 256 IP addresses (3 hosts up) scanned in 5.457 seconds

Th0r
08-14-05, 06:37 PM
Right, i've fixed everything now, apparantly because i set Mercury to use a static IP address, my router didn't like it, so i set it to dynamic and all is working again, but thankyou for all your help anyway! Much apprciated! :)

jajmon
08-14-05, 09:21 PM
A static addy should work, just assign it outside the dhcp range of addys your router is set to give out.

Th0r
08-15-05, 06:58 AM
What i have done is, i setup my router to reserve an IP address for Mercury, so it has the same IP address for everytime its renewed. :) Thankyou for your help :)