LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   apache port 8080 issue (https://www.linuxquestions.org/questions/linux-software-2/apache-port-8080-issue-130487/)

ryback 12-31-2003 11:11 PM

apache port 8080 issue
 
I have installed an apache web server and set it up to run on port 8080. My linux box is conected directly to the Internet and via LAN to 2 workstations. The problem is that even though I can see the web pages hosted on the server from the workstations, no one outside my LAN can access de web server.

It seems as if the server cannot be accesed from the outside. Any ideas?

Thanks.

Swift&Smart 12-31-2003 11:20 PM

Firewall?
 
Do you have any kind of firewall?? :D

ryback 12-31-2003 11:28 PM

yes, I think the problem is in a IPTABLES rule

When I type iptables -nL I get:

Chain INPUT (policy ACCEPT)
target prot opt source destination
DROP all -- 0.0.0.0/0 0.0.0.0/0 state INVALID,NEW

I think this is the problem. Which iptable command should I type to get rid of this?

Swift&Smart 12-31-2003 11:37 PM

Easy way out
 
I think you should try disabling the firewall by typing ntsysv if you use RedHat Linux.After you restart your computer,you can try to connect to the web server.If it works,then the problem lies on firewall.For firewall setting,I will check this out if you have problems regarding it. ;)

ryback 12-31-2003 11:38 PM

Looking at my rc.firewall file I found the following line:

iptables -A INPUT -p all -i eth1 -m state --state NEW,INVALID -j DROP

I understand that this line drops packet of any connection not originated by this pc. I would like to keep this behavior (drop unknown packets) except for port 8080 (the port Apache is listening to).

Can anyone give me the sintaxis for the iptables commands needed? thanks

ryback 12-31-2003 11:45 PM

Problem fixed. Thanks Swift&Smart for the idea about the firewall. I removed the line mentioned in the post above which disabled any external connection to the pc hosting the web page.

The remaining job is to block every port except 8080. Thanks.

Swift&Smart 01-01-2004 12:11 AM

Happy to know your success! :) Frankly speaking,I have disabled my server's firewall because I have a router which is doing the same thing and it's much more easier than configuring the iptables. :D


All times are GMT -5. The time now is 05:22 AM.