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

Blocking an IP

Hi
I'm a little confused. The only way I know to get a Server accessible to the public is via NAT rules. NAT rules are enforced before the firewall rules. What is the proper way to block an IP from accessing a NATed server? The country rules and firewall rules don't seam to work on a NATed server. Do I need to make a NAT rule to dump bad IPs into a sink?


This thread was automatically locked due to age.
  • Hi, turn off the 'Auto Firewall Rule' on the NAT, and create a Firewall rule manually to allow traffic.

    Then country blocking and higher-up rules will work.

    Barry
  • OK, found the problem. The automated firewall rules from creating a NAT,(invisible until next update), are placed at a higher priority then the editable firewall rules. So if your 1 rule is "BLOCK ALL", the NAT firewall rules are placed above that and will let traffic pass.

    To me, the Automatically generated NAT firewall rules, that are normally in the case of a DNAT are "ANY IP to your public IP allow", should have the lowest priority so we can overwrite with blacklists and the country block-list can work. Its kind of misleading to me to block china in the firewall section, and they can still access any of my NATed servers if I used automatic firewall rules.

    So, if you want to block IPs from your NAT'ed server, unchecked automatic firewall rules, then make your own where you have control.
  • I just tried removing the auto firewall rules from nat and creating an inbound firewall rule.  however, no traffic is passing, what to I need to do to allow the return traffic?
  • Hi, 

    Please post a screenshot of your firewall rule.

    The destination should be the INTERNAL IP of the server.

    Barry
  • Tom, it sounds like you might have run afoul of what I call Rule #3:

    Never create a Host/Network definition bound to a specific interface.
    Always leave all definitions with 'Interface: >'.


    Cheers - Bob