2

I'm using a VPS based on Ubuntu 16.04 that comes set up with UFW. One default rule of UFW limits the number of SSH connections (and given the number of attempts I see in the auth.log file, this is a good thing that I do no want to remove).

However this makes it difficult to write scripts that use remote commands to manage the server since these will typically create many connections (one per command).

So is there a way to lift that limit for a handful of trusted IPs?

2
  • 1
    As noted in the UFW documentation, "Rule ordering is important and the first match wins." - so it should be possible to add a less restrictive rule for specific IPs so long as it comes before the limit rule. Dec 18, 2016 at 0:05
  • OK, got it. Thx
    – xenoid
    Feb 8, 2017 at 11:13

1 Answer 1

2

Eventually figured it out:

ufw insert 1 allow in from nnn.nnn.nnn.nnn

where nn.nn.nn.nn should be replaced by the adequate IP of course.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .