LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-01-2004, 12:11 AM   #1
ryback
LQ Newbie
 
Registered: Jul 2003
Distribution: Slackware 9
Posts: 7

Rep: Reputation: 0
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.
 
Old 01-01-2004, 12:20 AM   #2
Swift&Smart
Member
 
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Rep: Reputation: 30
Firewall?

Do you have any kind of firewall??
 
Old 01-01-2004, 12:28 AM   #3
ryback
LQ Newbie
 
Registered: Jul 2003
Distribution: Slackware 9
Posts: 7

Original Poster
Rep: Reputation: 0
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?
 
Old 01-01-2004, 12:37 AM   #4
Swift&Smart
Member
 
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Rep: Reputation: 30
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.
 
Old 01-01-2004, 12:38 AM   #5
ryback
LQ Newbie
 
Registered: Jul 2003
Distribution: Slackware 9
Posts: 7

Original Poster
Rep: Reputation: 0
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
 
Old 01-01-2004, 12:45 AM   #6
ryback
LQ Newbie
 
Registered: Jul 2003
Distribution: Slackware 9
Posts: 7

Original Poster
Rep: Reputation: 0
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.
 
Old 01-01-2004, 01:11 AM   #7
Swift&Smart
Member
 
Registered: Jan 2003
Location: Hong Kong,China
Distribution: Slackware,OpenSUSE
Posts: 472

Rep: Reputation: 30
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.
 
  


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
port forwarding apache from 80 to 8080 chess Linux - General 11 09-27-2005 03:21 PM
Apache refuses connection on port 8080 apache363 Linux - Software 11 10-12-2004 06:56 PM
Port 80-->8080?? flamesrock Linux - Software 4 08-01-2004 02:40 AM
alt apache port 8080 say 5amYan Linux - Software 4 12-08-2002 01:11 AM
firewall.rc.config says :"open port 8080" but nmap says port is closed saavik Linux - Security 2 02-14-2002 01:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:29 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration