News: This forum is now permanently frozen.
Pages: [1]
Topic: NAT/Firewall : restrict DMZ access from WAN  (Read 4234 times)
« on: October 05, 2012, 08:07:24 »
dan31 *
Posts: 8

Hello,

There's actually a web server hosted on the DMZ interface. I would like to temporarily restrict the access to that zone from the WAN side.
Does anyone know how to proceed ?
I tried to add a rule on the WAN interface to restrict all kind of traffic coming from WAN interface in destination of DMZ interface. But it doesn't work. I think this is related to the fact I'm using NAT to match the 80 port to the web server. It means, for me, that even there's a rule which restrict WAN traffic going to DMZ, the NAT is applied first.

Actually, I simply deleted the NAT rule. That works but is unsafe for me.

Thanks for your help,
« Reply #1 on: October 05, 2012, 11:47:12 »
Јаневски ***
Posts: 153

Adding full blocking rule should work however You must respect the order of rules, in Your case i beleive You should pull up the blocking rule on the list.

« Reply #2 on: October 05, 2012, 15:44:27 »
dan31 *
Posts: 8

Yes, I correctly put the rule on the top of all and applied the changes. But nothing....  Huh
« Reply #3 on: October 05, 2012, 19:53:11 »
Lennart Grahl ***
Posts: 153

This should be pretty simple: Disable the firewall rule that allows packets to your server in DMZ from WAN (e.g. the WAN "tab") temporarily.

Everything else that isn't explicitly allowed will be blocked anyway.
« Reply #4 on: October 06, 2012, 18:22:36 »
dan31 *
Posts: 8

Hello,

Here are some of the rules actually applied :
NAT
If    Proto    Ext. port range    NAT IP    Int. port range    Description
WAN    TCP    80 (HTTP)    192.168.32.2    80 (HTTP)    Web server

Firewall - WAN interface
Proto    Source    Port    Destination    Port    Description
TCP    WAN address    *    DMZ net    * --> Reject

That rule is the first one just below the default Block private networks rule.
I applied the same rule on the DMZ interface and it still doesn't work. Any reason ??

Thanks,
« Reply #5 on: October 07, 2012, 16:23:44 »
dan31 *
Posts: 8

Any idea ?
I feel very unsafe at this moment and that doesn't make me comfortable :-S
« Reply #6 on: October 07, 2012, 16:41:45 »
Fred Grayson *****
Posts: 994


I think this is related to the fact I'm using NAT to match the 80 port to the web server. It means, for me, that even there's a rule which restrict WAN traffic going to DMZ, the NAT is applied first.



This premise is incorrect. Both a NAT rule and a matching firewall rule that allows access are required for a host on an internal interface to be reached from the WAN. Not one or the other, but both.

Without seeing your entire rules set it's not possible to diagnose your problem. As rules are applied in sequence, you may have the correct rule but not in the correct place.

Post screenshots of your NATs and WAN interface Firewall Rules.
« Last Edit: October 07, 2012, 17:18:09 by Fred Grayson »

--
Google is your friend and Bob's your uncle.
« Reply #7 on: October 07, 2012, 21:51:37 »
dan31 *
Posts: 8

Hello,

OK I found it. In fact, the first rule blocks the traffic coming from WAN address to DMZ (-> firewall_rules_blocks_to_DMZ.png).
Then, below, there's another rule which allows traffic from everywhere to DMZ.

My understanding is that the WAN interface doesn't include Internet addresses but only the subnet between my router (CE) and my carrier's router (PE). That's why it could still allows Internet traffic because it wasn't included into the WAN subnet.

Sorry if I made you wasting your time ...  Undecided

Hope this can help anybody else in the same situation. And thank you for your help  Smiley


* firewall_rules_blocks_to_DMZ.png (12.37 KB, 578x186 - viewed 358 times.)

* firewall_rules_allows_to_webserver.png (4.46 KB, 577x42 - viewed 401 times.)
« Reply #8 on: October 07, 2012, 22:37:03 »
Lennart Grahl ***
Posts: 153

 Huh

Anyway, you've found the solution for your problem.
« Reply #9 on: October 08, 2012, 08:00:52 »
dan31 *
Posts: 8

Yes, I did finally.
But are my thoughts corrects ? I just would like to be sure about how it works really...

Thanks,
 
Pages: [1]
 
 
Powered by SMF 1.1.20 | SMF © 2013, Simple Machines