5

Using Ubuntu server 14.04LTS I want to configure my UFW to limit ssh connections with the following command:

sudo ufw insert 1 limit ssh/tcp

which throws an error: ERROR: Invalid position '1'

Due to the fact that this command accepts no number at all there should be no other rule placed under number 1...

man ufw

outputs the following insert NUM RULE whereas RULE should be limit ssh/tcp. That said my syntax should be correct.

Anyone knows whats going on here?

Mike
  • 163
  • 1
  • 5

1 Answers1

3

This is because position '1' can only be valid if there is already existing at least a rule, so to insert your rule in position 1 you just need to insert a rule without position at all it will be default to position '1' from then on you can have position '2' or position '3'

Dung
  • 141
  • 4