Comment 11 for bug 1368411

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Thanks for all the feedback! FYI, since '1' in ufw corresponds to the literal rule number '1', this is going to be implemented with a new 'prepend' command. Eg:

$ sudo ufw allow 22/tcp
$ sudo ufw allow from 1.2.3.4
$ sudo ufw allow from 2001:db8::/32
$ sudo ufw status numbered
...
[1] 22/tcp ALLOW IN Anywhere
[2] Anywhere ALLOW IN 1.2.3.4
[3] 22/tcp (v6) ALLOW IN Anywhere (v6)
[4] Anywhere (v6) ALLOW IN 2001:db8::/32

$ sudo ufw prepend deny from 2a02:2210:12:a:b820:fff:fea2:25d1
$ sudo ufw prepend deny from 6.7.8.9
$ sudo ufw status numbered
...
[1] Anywhere DENY IN 6.7.8.9
[2] 22/tcp ALLOW IN Anywhere
[3] Anywhere ALLOW IN 1.2.3.4
[4] Anywhere (v6) DENY IN 2a02:2210:12:a:b820:fff:fea2:25d1
[5] 22/tcp (v6) ALLOW IN Anywhere (v6)
[6] Anywhere (v6) ALLOW IN 2001:db8::/32