Advertisement

06.13.2007 at 11:41PM PDT, ID: 22633094
[x]
Attachment Details

IPTables

Asked by Simon336697 in IP Tables/IP Chains, Linux Networking, Linux Network Security

Tags: iptables, ip

Hi guys hope u can help out.

I have a linux RedHat Enterprise Desktop ver 5 machine at home.
It has just the one network card. It has apache running.
I also have a wirelss router that performs nat so that I can access the web server from any location.

Let's say my home network LAN IP range is 192.168.2.x/24, with Private IP 192.168.2.9 assigned to my apache  linux box.
Let's say also I have dynamic dns enabled on my wireless router, and that I get assigned a dynamic IP from my provider of eg.203.44.6.78.
Also on the router I port forward port 80 to my apache linux server on private IP 192.168.2.9, so that I can access the apache web server when away from home.

What Id like help with is iptables. At the moment I have it switched off, but want to turn it on.

What I want to be able to do is the following:

1) Be able to connect to my web server (sitting on 203.44.6.78 (externally) / 192.168.2.9 (internally)   remotely (as Im doing now).
2) Only be able to connect to my web server from 2 locations:
              a) From home Lan range (192.168.2.x/24) eg.any home machine on this lan
       and b) From public IP 144.3.6.78
3) Block access to my web server machine from any other location that is not listed in requirement 2)
4) From home lan range 192.168.2.x/24 and from public ip 144.3.6.78, I need to access the following ports on the home web server:
ports 22, 80, 443
a) Id like to know how to set up rules to restrict it just to these 3 ports on the web server
and
b) As an alternative to a), how to set up rules if I wanted to open up all ports on the web server for lan range 192.168.2.x/24 and from public ip 144.3.6.78.

Any help greatly appreciated.

Thank you.

Start Free Trial
[+][-]06.14.2007 at 02:49AM PDT, ID: 19281984

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.14.2007 at 02:50AM PDT, ID: 19281986

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.14.2007 at 03:26PM PDT, ID: 19287697

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.15.2007 at 12:30AM PDT, ID: 19289808

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: IP Tables/IP Chains, Linux Networking, Linux Network Security
Tags: iptables, ip
Sign Up Now!
Solution Provided By: effx
Participating Experts: 1
Solution Grade: A
 
 
[+][-]06.15.2007 at 12:33AM PDT, ID: 19289818

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.15.2007 at 06:45AM PDT, ID: 19291769

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32