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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
12-19-2009, 12:35 AM
|
#1
|
LQ Newbie
Registered: Nov 2009
Distribution: Ubuntu 10.04
Posts: 22
Rep:
|
port 80 blocked
I have found I can no longer access my home server website externally and internally. I can ftp the directory and html pages, access the site using putty every thing is fine. When I type in 'sudo nmap -p 80 192.168.1.3' to check the port I am told
PORT STATE SERVICE
80/tcp closed http
so I assume that a firewall somewhere on my server is blocking port 80 but I don't seem to be able to find where this is occurring.
I have checked related posts in this forum but none seem to help.
Last edited by peter53; 12-19-2009 at 12:38 AM.
|
|
|
12-19-2009, 12:46 AM
|
#2
|
LQ Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211
Rep: 
|
Welcome to LQ.
What changed?
Are you running any firewalls - check them - check hardware routers etc for built in firewalls - do you use any automatic updates?
|
|
|
12-19-2009, 12:58 AM
|
#3
|
LQ Newbie
Registered: Nov 2009
Distribution: Ubuntu 10.04
Posts: 22
Original Poster
Rep:
|
WHat changed, good question, I am not sure I am using Ubuntu server software I have been updating regularly myself. its using a shorewall firewall and I put in
'ACCEPT net $FW tcp 80' in to the rules file.
I've checked the iptables and have put in
ACCEPT tcp -- anywhere anywhere tcp dpt:www
but still no luck when I check the port.
|
|
|
12-19-2009, 01:21 AM
|
#4
|
Senior Member
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288
Rep:
|
If you turn off both firewalls, can you connect? Is you web server running? Is it listening on the external IP? Can you get to it by IP from the server?
Let us know,
Forrest
|
|
|
12-19-2009, 02:53 AM
|
#5
|
LQ Newbie
Registered: Nov 2009
Distribution: Ubuntu 10.04
Posts: 22
Original Poster
Rep:
|
Hi Forrestt,
If you turn off both firewalls, can you connect?
I turned of shorewall and checked port80 - still blocked
I don't know how to turn of the other firewall you refer to.
I did try 'sudo iptables -F' to flush out the iptables all that did is hang the server requiring a reboot.
Is you web server running?
yes it is running I can connect using putty and mozilla ftp. I can look into the www directory. Start the index.html file using knome on the server so all is fine except for the port being closed.
Is it listening on the external IP?
I put 'Listen 80' in the httpd.conf file.
Can you get to it by IP from the server?
not sure what you mean here.
I am just blundering through here so sorry if I don't always understand how things are done.
|
|
|
12-19-2009, 03:00 AM
|
#6
|
Senior Member
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288
Rep:
|
Sorry, I didn't mean was the hardware running, I meant was the httpd running. You can connect with putty (sshd is running) and ftp (ftpd is running) without being able to connect to the web server (httpd is NOT running). By "Can you get to it by IP from the server?" I mean, if you go to the server console, open up firefox and type in the IP address of the server, do you get a page?
Forrest
|
|
|
12-19-2009, 03:01 AM
|
#7
|
Member
Registered: Nov 2007
Location: Lincolnshire, UK
Distribution: CentOS, Fedora, and Suse
Posts: 365
Rep:
|
I think iptables (if running) can be switched off with:
Code:
service iptables stop
You could first check the status of iptables
Code:
service iptables status
This will tell you whether it is running.
|
|
|
12-19-2009, 03:34 AM
|
#8
|
LQ Newbie
Registered: Nov 2009
Distribution: Ubuntu 10.04
Posts: 22
Original Poster
Rep:
|
Hi Harry,
I tried
'sudo service iptables stop'
and I get '$iptables: unrecognized service'
Hi Forrestt,
I typed in http://192.168.1.3
and I get 'refused connection'
If I type in to connect to http://google.com it connects without any trouble.
|
|
|
12-19-2009, 03:48 AM
|
#9
|
Senior Member
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288
Rep:
|
It sounds like your web server isn't running. Look at your error logs to see why.
Forrest
|
|
|
12-19-2009, 03:52 AM
|
#10
|
LQ Newbie
Registered: Nov 2009
Distribution: Ubuntu 10.04
Posts: 22
Original Poster
Rep:
|
Can you tell me how I access the error logs forrestt?
Last edited by peter53; 12-19-2009 at 04:56 AM.
|
|
|
12-19-2009, 05:06 AM
|
#11
|
Senior Member
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288
Rep:
|
They should be in "/var/log/httpd".
HTH
Forrest
|
|
|
12-19-2009, 09:41 AM
|
#12
|
LQ Newbie
Registered: Apr 2009
Posts: 15
Rep:
|
Firewall is the first place I would check.
|
|
|
12-19-2009, 02:44 PM
|
#13
|
Senior Member
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288
Rep:
|
jaymarting, I agree, but since he's turned them off and still gets a connection refused, we're past that point.
Forrest
|
|
|
12-19-2009, 04:43 PM
|
#14
|
LQ Newbie
Registered: Nov 2009
Distribution: Ubuntu 10.04
Posts: 22
Original Poster
Rep:
|
Hi Forrest,
I tried to look in the /var/log/httpd directory but I don't have one.
I did look in var/log/ directory
I then tried to connect to the webserver and checked the logs that updated when I tried to look at the web page but couldn't see anything of relevance with my limited understanding.
refering to your comment to jaymarting forrestt about turning the firewalls off I turned off shorewall but I don't know what others to turn off.
|
|
|
12-20-2009, 03:33 AM
|
#15
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
netstat -an | grep -E ':80|:443'
That should tell us whether ANYTHING is listening or active on port 80 or 443
Cheers,
Tink
|
|
|
All times are GMT -5. The time now is 09:12 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|