Help us enhance your Sophos Community experience. Share your thoughts in our Sophos Community survey.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DNAT and Firewall Rule Question

So I wanted to block some malicious IPs and I placed a block rule at the top of my firewall rule list.  Then I discovered to my surprise that the traffic wasn't being blocked.  This is because I am using DNAT with Automatic Firewall Rule checked.  Therefore, the traffic was being allowed before my block rule ever applied.

So upon perusing the forum, I see that there are two ways around this:

1) Add a blackhole NAT rule as the first DNAT
2) Stop using automatic firewall rules and add separate firewall rules for each NAT entry.


So my question is, are there any pros/cons to each approach?  I have about 40 DNAT rules setup, so that is a lot of firewall rules I'd have to add. But if that is a better way of doing things, I'll change it.  Any thoughts/advice?  Thanks.

Matt

P.S. Where does Country Blocking fall in w/r to DNAT?


This thread was automatically locked due to age.
Parents
  • #1 is going to be the simplest to implement.  Dispensing with automatic firewall rules in lieu of manually created ones (as much as possible) will give you maximum visibility to the traffic, through the firewall logs, and granularity of control.

    Country blocking rules are the first to be processed.  A potential pitfall with this is that more and more, content is being served from distributed providers, such as Akamai.  These have servers all over the world, so some of the content of a site for a US company might be coming from China or Malaysia.
    __________________
    ACE v8/SCA v9.3

    ...still have a v5 install disk in a box somewhere.

    http://xkcd.com
    http://www.tedgoff.com/mb
    http://www.projectcartoon.com/cartoon/1
Reply
  • #1 is going to be the simplest to implement.  Dispensing with automatic firewall rules in lieu of manually created ones (as much as possible) will give you maximum visibility to the traffic, through the firewall logs, and granularity of control.

    Country blocking rules are the first to be processed.  A potential pitfall with this is that more and more, content is being served from distributed providers, such as Akamai.  These have servers all over the world, so some of the content of a site for a US company might be coming from China or Malaysia.
    __________________
    ACE v8/SCA v9.3

    ...still have a v5 install disk in a box somewhere.

    http://xkcd.com
    http://www.tedgoff.com/mb
    http://www.projectcartoon.com/cartoon/1
Children
  • Yeah, that is why I was kinda shying away from using Country Blocking.  So Country Blocking happens even before the DNAT?


    I know the black hole DNAT would be easiest, just didn't know if it would cause other problems/issues.  I just want to do it the best/proper way and if best practice would be to not use the automatic firewall rules, I'll bite the bullet and change it.  Would be nice to have both before and after rule sets maybe.


    Matt