This example shows how to specify a port range in your rules. Using the ports from the last two examples before this one, we specify a port range in the form: port1:port2. One advantage of using a port range is that it reduces the number of rules that you create.
There are four policies that can be defined in a rule: Allow, Deny, Reject and Limit. The effect of an Allow rule is self-explanatory. If a packet matches a Deny rule, the packet will be dropped silently. The source host is not notified. Reject will trigger an ICMP destination unreachable message back to the source host. Limit rules are used to place a cap on the number of unsuccessful attempts from a host. They protect against brute-force attacks. In ufw, the number of unsuccessful attempts that will trigger a rate-limiting rule is 6 (or more) within the last 30 seconds. When a rate-limiting rule is triggered, subsequent packets from the offending host are denied (DROPped). Rate limiting rules may be defined from all three tabs, not just from the Advanced tab.
The following example shows a rate-limiting rule for incoming ssh traffic from a specific source to a specific destination.
Digital Ocean is a VPS/Cloud hosting provider. For just $5 per month, you can get yourself a Cloud server with 512 MB of RAM, 20 GB super-fast SSD, free snapshots, plus backups for a minimal fee. All via a simple graphical interface.
And by signing up with this referral link, you can help support this website.
If you are reading this, your ad could also be occupying this space. Contact us to make it happen.