LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 06-03-2004, 04:34 AM   #1
glevine
LQ Newbie
 
Registered: May 2004
Posts: 10

Rep: Reputation: 0
port 80, firewalls, and webservers


I installed the rc.firewall and then I set up a webserver using Apache. Using ShieldsUp I checked the status of my ports. Knowing the Port 80 needs to be open in order for the webserver to work correctly, I am wondering if it is OK that that status of Port 80 is Stealth? So do I need to open Port 80? Also, since my computer is behind a router, would configuring port forwarding on the router solve this issue for me instead of opening up any ports?

Thanks,
Greg
 
Old 06-03-2004, 05:31 AM   #2
kbcnetau
Member
 
Registered: Dec 2003
Location: South Australia (ex-Devon, UK)
Distribution: SuSE, Slackware, Fedora, Debian, Knoppix
Posts: 141

Rep: Reputation: 15
Is that a masquerading router for your network? If so, and the Web server is on a different box to the one doing the routing, yes, I would just port forward tcp/80 to the appropriate machine.
 
Old 06-03-2004, 05:48 AM   #3
glevine
LQ Newbie
 
Registered: May 2004
Posts: 10

Original Poster
Rep: Reputation: 0
OK, I'm having trouble with port forwarding. I have a LinkSys EtherFast Cable/DSL Router with 4-Port Switch (Model # BEFSR41). I go into the router config and go to the Forwarding tab. I click on the UPnP Forwarding button. For HTTP I make sure that TCP is selected, that the Internal External Ports are both 80, and I set the IP Address to the address of my computer within my local network (192.168.1.102). My IP Address outside the network is 151.199.115.99. I can get to my website using http://localhost/ and I can get to it using http://192.168.1.102 but I can't get to it using http://151.199.115.99. I checked the status of my ports again and Port 80 is still listed as Stealth. What am I doing wrong?

Thanks,
Greg
 
Old 06-03-2004, 05:52 AM   #4
glevine
LQ Newbie
 
Registered: May 2004
Posts: 10

Original Poster
Rep: Reputation: 0
Something to add to that....

My Apache webserver is running on 127.0.0.1. Could this be my problem? Do I need to configure the webserver to run on 192.168.1.102?
 
Old 06-03-2004, 09:19 AM   #5
bleunuit
LQ Newbie
 
Registered: May 2004
Posts: 18

Rep: Reputation: 0
Quote:
Originally posted by glevine
Something to add to that....

My Apache webserver is running on 127.0.0.1. Could this be my problem? Do I need to configure the webserver to run on 192.168.1.102?
Some isp's block port 80, so if you're apache webserver is listening to port 80 it may not be getting any traffic. Try editing your httpd.conf file and having apache listen to port 8080 or some other high port that is not being used by any other processes. Then get into your router and route all traffic on port 8080 to your computer. When accessing your computer type http://some_address:8080/. Be sure to restart apache after making changes to the httpd.conf file. Also, I don't think apache is supposed to run on 127.0.0.1, i could be wrong, but that doesnt make much sense to me for apache to run on the loopback address.

hope this helps
-bleunuit
 
Old 06-03-2004, 10:17 AM   #6
glevine
LQ Newbie
 
Registered: May 2004
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Also, I don't think apache is supposed to run on 127.0.0.1, i could be wrong, but that doesnt make much sense to me for apache to run on the loopback address.
Actually, that is the address of localhost, which is where you access your site from the server itself when the site is not in production, so there is no problem with it being on 127.0.0.1. That IP address is each computer's IP address that it gives to itself, so everyone's local host is 127.0.0.1, unless you can change it I guess.

If I configure Apache to listen to port 8080 or something like that, then my site would be located at http://LAN_IP_Address:8080 but if I used a service like dyndns.com or public-dns.org, would they be able to access my server correctly so that my page gets displayed using the domain that I registered?

Also, would using port 443 (SHTML) work the same as 80, or is that another way of by-passing the listening port problem with port 80?
 
Old 06-03-2004, 10:38 AM   #7
bleunuit
LQ Newbie
 
Registered: May 2004
Posts: 18

Rep: Reputation: 0
Quote:
Originally posted by glevine
Actually, that is the address of localhost, which is where you access your site from the server itself when the site is not in production, so there is no problem with it being on 127.0.0.1. That IP address is each computer's IP address that it gives to itself, so everyone's local host is 127.0.0.1, unless you can change it I guess.

If I configure Apache to listen to port 8080 or something like that, then my site would be located at http://LAN_IP_Address:8080 but if I used a service like dyndns.com or public-dns.org, would they be able to access my server correctly so that my page gets displayed using the domain that I registered?

Also, would using port 443 (SHTML) work the same as 80, or is that another way of by-passing the listening port problem with port 80?
It works the same whether you have a domain or not. When you register your domain it simply aliases your ip address to a name so when a user queries a name server for your_domain that nameserver will know about your ip address from higher level nameservers. In this case the ip address of your router is aliased to your_domain and you still have to specify the port 8080 because the router wont know where to route the traffic, also your isp may be blocking port 80 and by default all http requests use port 80.

As for the shtml, im not sure if isp's even block that port, so you may be able to just leave that alone. You wont have to add the :443 to the end of your domain because by default shtml protocols will use that port number.

-bleunuit
 
Old 06-03-2004, 10:58 AM   #8
glevine
LQ Newbie
 
Registered: May 2004
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks bleunuit, you've been a big help. I understand the process now, but I have to wait until I'm back at home to actually try to implement it.

Just out of curiosity, if someone cares to answer, are most people on this and some of the other linux messages boards students or are they programmers, network admins, etc. in the actual workforce? I myself am a CS student at Virginia Tech and are using these message boards for the first time, so I am wondering where the majority of this information on these boards is coming from.
 
Old 06-03-2004, 11:03 AM   #9
bleunuit
LQ Newbie
 
Registered: May 2004
Posts: 18

Rep: Reputation: 0
Smile

I'm a student during the school year and I will be graduating with a BS in computer enginnering from a Tech school in Vermont. I scored a linux system admin internship for the summer so I guess I'm kinda workforce/student.
 
  


Reply



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
multiple webservers one gateway? phonecian Linux - Networking 4 03-11-2005 11:10 AM
inetd, firewalls & webservers clair_rand Linux - Security 3 11-08-2004 06:31 PM
Webservers thekore Linux - Networking 2 06-13-2004 11:21 AM
small php webservers ? xconspirisist Linux - General 1 05-20-2004 06:42 AM
Linux Firewalls [iso firewalls] yoogie Linux - Networking 3 01-28-2002 06:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:51 PM.

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
Open Source Consulting | Domain Registration