LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-10-2013, 11:46 PM   #1
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 725

Rep: Reputation: 153Reputation: 153
access webpage on another PC in my network


Hi, I have run into a brick wall and I think I may be missing something obvious.

I set up LAMP/Mediawiki 1.20.2 on a CENTOS 6 server. From that server I can http://10.1.1.101/mw. With mw being the name of my wiki. At this point I am editting the wiki. I can also see 10.1.1.101/index.php so it looks like all components are working internally.

I want to view the wiki from firefox on another PC. (which can access 10.1.1.101) so I try 10.1.1.101/mw and I get
Firefox can't establish a connection to the server at 10.1.1.101.
Is there something I need to open on the CENTOS firewall to allow incoming http traffic?

Thanks
 
Old 01-11-2013, 01:33 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,899

Rep: Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885
Hi,

I guess you need to open port 80. To do so, add
Code:
-A RH-Firewall-1-INPUT -m tcp -p tcp --dport 80 -j ACCEPT
before the COMMIT line in /etc/sysconfig/iptables and restart the iptables service.
For more detail have a look here

Regards
 
1 members found this post helpful.
Old 01-12-2013, 01:29 AM   #3
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 725

Original Poster
Rep: Reputation: 153Reputation: 153
Hi bathory, firstly thanks for the link and advice. I have added both to my wiki.

I entered the new line (which I verified in the link provided) to iptables and restarted the service. When I restarted I got an error:

iptables: Applying firewall rules: iptables-restore: line 22 failed
[FAILED]
I found a site (http://www.mythdora.com/?q=node/4638) which recommended removing the RH-Firewall-a component of the line. This allowed iptables to restart but I still could not access HTTP from another PC. Is this advice valid?

Anyway, I have run our of time today and will resume tomorrow with a better idea of what I am doing.


Cheers
 
Old 01-12-2013, 04:41 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,899

Rep: Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885Reputation: 1885
Quote:
I entered the new line (which I verified in the link provided) to iptables and restarted the service. When I restarted I got an error:


iptables: Applying firewall rules: iptables-restore: line 22 failed
[FAILED]
Did you put your rule(s) before the COMMIT line?

Quote:
I found a site (http://www.mythdora.com/?q=node/4638) which recommended removing the RH-Firewall-a component of the line. This allowed iptables to restart but I still could not access HTTP from another PC. Is this advice valid?
Don't think so. Maybe you need to add
Code:
:RH-Firewall-1-INPUT - [0:0]
just after the
Quote:
:OUTPUT ACCEPT [0:0]
line.
 
Old 01-13-2013, 03:19 PM   #5
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 725

Original Poster
Rep: Reputation: 153Reputation: 153
Hi bathory, Firstly I could not get iptables to accept the RH-Firewall-1-INPUT component. I kept getting the error mentioned above. I ended up with this line.
-A INPUT -m tcp -p tcp --dport 80 -j ACCEPT
I also tried with the --state parameter. I restarted ip tables without error but I could still not access the site.

Hmmmm, embarrassed mode! I restarted firefox and I can access the site.

Thanks for your help and the link. I am marking this as solved
 
  


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
Why i can't access www.ubuntu.com webpage? khanh_coltech Ubuntu 5 10-24-2007 12:48 PM
Webpage access jayhawk Linux - Newbie 2 06-16-2006 10:50 AM
webpage access on squid taiwf Linux - Software 2 02-28-2006 08:31 AM
Not able to access webpage on apache krishvij Linux - Networking 2 01-27-2006 04:59 AM
Deny Webpage Access thebrave65 Linux - Security 5 05-20-2003 01:51 PM

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

All times are GMT -5. The time now is 07:32 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