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

Deny public IP´s on DNAT ftp rule

Hi!

I cant figure out how to deny selected public ip/networks for my DNAT rule for ftp. The DNAT itself works great but when i try to create a rule for my WAN interface there is no success. I have created a network group in which i put my not wanted networks to accessing my ftp. 

Rule -> Not_wanted_Networks - FTP - WAN  -> Drop

How should i do it?


This thread was automatically locked due to age.
Parents
  • I believe DNAT rules are processed before the packet filter, therefore the traffic will not match your drop rule. You will want to not use the automatic packet filter rule in the DNAT and instead use manual packet filter rules. Place the drop rule above the allow rule with a destination of your internal ftp server as order does matter.

    example rules:
    DNAT
    Source: Any
    Service: FTP
    Destination: External Wan address
    Change Destination to: Internal ftp server IP

    Packet filter:
    1. Not_wanted_Networks - FTP - Internal ftp server IP -> Drop
    2. Any - FTP - Internal ftp server IP -> Allow

    Another option would be to only allow specific Networks instead of having "Any" in the dnat and packet filter rules.
Reply
  • I believe DNAT rules are processed before the packet filter, therefore the traffic will not match your drop rule. You will want to not use the automatic packet filter rule in the DNAT and instead use manual packet filter rules. Place the drop rule above the allow rule with a destination of your internal ftp server as order does matter.

    example rules:
    DNAT
    Source: Any
    Service: FTP
    Destination: External Wan address
    Change Destination to: Internal ftp server IP

    Packet filter:
    1. Not_wanted_Networks - FTP - Internal ftp server IP -> Drop
    2. Any - FTP - Internal ftp server IP -> Allow

    Another option would be to only allow specific Networks instead of having "Any" in the dnat and packet filter rules.
Children
  • Thanks i will try that!

    /Linkan 

    I believe DNAT rules are processed before the packet filter, therefore the traffic will not match your drop rule. You will want to not use the automatic packet filter rule in the DNAT and instead use manual packet filter rules. Place the drop rule above the allow rule with a destination of your internal ftp server as order does matter.

    example rules:
    DNAT
    Source: Any
    Service: FTP
    Destination: External Wan address
    Change Destination to: Internal ftp server IP

    Packet filter:
    1. Not_wanted_Networks - FTP - Internal ftp server IP -> Drop
    2. Any - FTP - Internal ftp server IP -> Allow

    Another option would be to only allow specific Networks instead of having "Any" in the dnat and packet filter rules.