DMZ and iptables breaks my head!!! Avanced Help please!!!!
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
All traffic to your "server" goes though FORWARD chain on "firewall".
Right now they are:
-A FORWARD -i eth0 -o eth2 -j ACCEPT # to the "server"
-A FORWARD -i eth2 -o eth0 -j ACCEPT # from the "server"
To add new filter on "firewall" you can add additional chain, for example:
-A forward_in_filter : for incoming filtration
-A forward_out_filter : for outgoing filtration
And modify them:
-A forward_in_filter -s <nasty IP> -j DROP #this will drop all from <nasty IP>
-A forward_in_filter -s <nasty IP> -j DROP
. . .
-A forward_in_filter -j ACCEPT #this will allow the rest.
And for outgoing:
-A forward_out_filter -m state --state NEW -j DROP #this will prevent connection start.
-A forward_out_filter -j ACCEPT #everything else goes out.
Now modify main chain:
-A FORWARD -i eth0 -o eth2 -j forward_in_filter
-A FORWARD -i eth2 -o eth0 -j forward_out_filter
OK, I should learn more very much about iptables...
Do you means that could have one chains to filter "server" and another chains filter "firewal" and rest of traffic that not goes to "server"??
And ALL them DROP ??
OK, I should learn more very much about iptables...
Do you means that could have one chains to filter "server" and another chains filter "firewal" and rest of traffic that not goes to "server"??
And ALL them DROP ??
They are all for "firewall"
Do not change anything in "server" - its job = web server.
"firewall" will do the rest.
Mean leave all the original script (the script that I pasted on page 1 of this post) like is without changes, EXCEPT on the chain forward???
But then YES make the changes that you has proposed on chain FILTER FORWARD???
Of mode applied on same "firewall" (and with a more refined filter) one chain to filter traffic to/from "server" and other chain to filter traffic of rest of WAN / LAN ???
Last edited by MikeHammer; 12-28-2009 at 03:44 PM.
Mean leave all the original script (the script that I pasted on page 1 of this post) like is without changes???
BUT YES make the changes that you has proposed on chain FILTER FORWARD???
Leave script on "server" without changes.
If you decide to filter traffic do changes on "firewall" script.
No, I wanna say:
Mean leave all the original script into machine "firewall" (the first script that I pasted on page 1 of this post) like it is, without changes, except on the chain forward???
Then make the changes that you has proposed on chain FILTER FORWARD???
So, to applied on the same "firewall" (and with a more refined filter) one chain to filter traffic to/from "server" and other chain to filter traffic of rest of WAN / LAN ???
No, I wanna say:
Mean leave all the original script into machine "firewall" (the first script that I pasted on page 1 of this post) like it is, without changes, except on the chain forward???
Then make the changes that you has proposed on chain FILTER FORWARD???
When you will decide, yes, change chains FORWAND on "firewall" computer, in accordance with my suggestions.
Quote:
Originally Posted by MikeHammer
So, to applied on the same "firewall" (and with a more refined filter) one chain to filter traffic to/from "server" and other chain to filter traffic of rest of WAN / LAN ???
Traffic, which goes from one NIC to other - transit traffic, you can filter it out only in FORWARD chains.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.