LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 04-17-2015, 07:55 AM   #1
maharaj.narayanan
LQ Newbie
 
Registered: Mar 2015
Posts: 9

Rep: Reputation: Disabled
Unhappy Problem with Firewall. :(


Hi,
i have a index page in /var/www/html, from the local machine i can open the page as localhost or the machine name even the firewall is on or off, But when i type the ip of the machine in another LAN pc it automautically navigate to another folder say like 192.168.1.1 enter -> 192.168.1.1/newpage and gives out 404 error when the firewall is up but i get the page when the firewall is down what do i do?
 
Old 04-17-2015, 08:35 AM   #2
loadedmind
Member
 
Registered: Sep 2003
Location: Texas
Distribution: Red Hat/CentOS
Posts: 302
Blog Entries: 4

Rep: Reputation: Disabled
Adjust your firewall to account for the web traffic. man iptables.
 
Old 04-17-2015, 06:25 PM   #3
joe_2000
Senior Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Debian
Posts: 1,016

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
You need to allow inbound traffic on ports 80 (http) and 443 (https)

Something like this in your iptables config script:
Code:
/sbin/iptables -I INPUT -p tcp -m multiport --dports 80,443 -j ACCEPT -m comment --comment "Allow outbound http and https"
Then you might also need to allow the established connections to go back out:

Code:
/sbin/iptables -I OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
Note the -I flags are inserting the rules at the beginning of the rule chain. This is to make sure they will actually be applied before some other rejection rules kick in.

Now depending on your setup you may want to use the -A flag (append) and place the rules at a specific location in your overall config.

These are just examples that may open holes that are larger than you want them to be. If you post your current config and provide more input on what traffic you want to be blocked more detailed advice could be given...
 
  


Reply

Tags
apache, http, httpd, httpdconf



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
Firewall problem? Marc-ahs Linux - Newbie 8 03-19-2009 08:34 AM
Firewall problem Rayskovsky Linux - Networking 1 01-23-2009 08:27 PM
firewall problem? holden94122 Linux - Networking 4 07-26-2005 09:08 PM
firewall problem ? CavRider Slackware 4 12-13-2003 05:17 PM
Problem with FireWall??? please help! latehit Linux - Security 1 12-14-2002 03:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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