LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-13-2007, 07:54 PM   #1
tekmann33
Member
 
Registered: Nov 2006
Posts: 188

Rep: Reputation: 30
Port 80 isn't open


I just installed apache2 on a Fedora Core 6 machine. I have it running properly and I can get the "It Works" page to come up when I put in the local private address of the server "192.168.1.103"

However, I cannot access it remotely from within the same private network. I checked the firewall setting "System/Administration/Security level and firewall and made sure both http and https were checked.

I totally disabled the firewall and SELinux and I still had the same issue where I could not get to the web page remotely.

I ran an nmap on the apache server ip and came up with the following:

Code:
[root@BriansRH ~]# nmap 127.0.0.1

Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2007-02-13 18:52 CST
Interesting ports on localhost (127.0.0.1):
Not shown: 1675 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
25/tcp   open  smtp
111/tcp  open  rpcbind
707/tcp  open  unknown
6000/tcp open  X11

Nmap finished: 1 IP address (1 host up) scanned in 0.135 seconds
[root@BriansRH ~]#
Shouldn't I see port 80 as being open? If so, how do I correct this?
 
Old 02-13-2007, 08:02 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 62
nmap should show port 80 open if you are searching for it and the service is running. Firewall would not matter because you are access the loopback interface. The firewall can still be blocking so you would need to use the lan IP instead of the loopback interface IP.

Are you saying you cannot use the external IP of your network to get to the webserver?

Now if you are at a remote site can you see your webserver?

Is there a router between the machine and the internet?

If yes to all three and the router is a store bought router then this is normal for them. The store bought routers lack the ability to use the external IP from within the lan side.

Brian
 
Old 02-13-2007, 08:18 PM   #3
tekmann33
Member
 
Registered: Nov 2006
Posts: 188

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Brian1
nmap should show port 80 open if you are searching for it and the service is running. Firewall would not matter because you are access the loopback interface. The firewall can still be blocking so you would need to use the lan IP instead of the loopback interface IP.

Are you saying you cannot use the external IP of your network to get to the webserver?

Now if you are at a remote site can you see your webserver?

Is there a router between the machine and the internet?

If yes to all three and the router is a store bought router then this is normal for them. The store bought routers lack the ability to use the external IP from within the lan side.

Brian
I cannot use the external IP 192.168.1.103 of my web server from a machine within the same 192.168.1.X network to access apache. I can access the web page if I type in that address on the server itself, but I am unsuccessful from any other machine in my private network.

My network is basically 4 machines hooked into a linksys router. My machines all have private static IP's
 
Old 02-13-2007, 08:30 PM   #4
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 62
Have you runned a port scan from one of the other machines on the webserver to see if the port is open?
Can you ping the webserver from another machine?

Brian
 
Old 02-13-2007, 08:57 PM   #5
tekmann33
Member
 
Registered: Nov 2006
Posts: 188

Original Poster
Rep: Reputation: 30
It seems as if I cannot ping nor port scan my server from within my network.

Code:
C:\Program Files\Nmap>nmap 192.168.1.130

Starting Nmap 4.20 ( http://insecure.org ) at 2007-02-13 19:
Time
Note: Host seems down. If it is really up, but blocking our

Nmap finished: 1 IP address (0 hosts up) scanned in 0.291 se

C:\Program Files\Nmap>ping 192.168.1.130

Pinging 192.168.1.130 with 32 bytes of data:

Request timed out.
Request timed out.
I get the same results when I disable the firewall and SELINUX. Not sure what is going on.

My server is up and running. I can ping other machines from the server and I receive internet access as well.

Strange.

Last edited by tekmann33; 02-13-2007 at 08:58 PM.
 
Old 02-14-2007, 02:56 PM   #6
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Try doing a netstat -tan to make sure that Apache isn't just listening on the loopback interface, but actually waiting for connection on the external interface.

Also, just for fun, please post your iptables -L just to make sure that the firewall is completely disabled.
 
Old 02-14-2007, 04:26 PM   #7
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 62
Are you sure the IP is correct? Do an ' /sbin/ifconfig -a ' and post the output.

Why you cannot ping it is really odd unless being blocked somewhere.
No iptables or selinux is running?
What is in your /etc/host.allow and /etc/host.deny files?
To flush the iptables run the command as root ' /sbin/iptables -F '.
Post the contents of /etc/sysconfig/network-scripts/ifcfg-eth0.

Brian
 
  


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
best port scanner To scan open port in a network tanveer Linux - Security 8 01-21-2007 09:19 PM
cannot SFTP to SUSE 9.2 box, port 22 open, can putty in though using same port. jgrady Linux - Networking 6 03-29-2005 09:44 AM
Open FW port rulleeeee Linux - Networking 1 02-01-2003 10:49 AM
firewall.rc.config says :"open port 8080" but nmap says port is closed saavik Linux - Security 2 02-14-2002 01:16 PM
Open Port d-man38 Linux - Security 3 04-15-2001 02:43 PM


All times are GMT -5. The time now is 08:16 AM.

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