# Ansible UFW module: inaccurate documentation?

**URL:** <https://forum.ansible.com/t/ansible-ufw-module-inaccurate-documentation/15817>\
**Category:** Ansible Project\
**Created:** [July 30, 2014, 10:48pm UTC](https://forum.ansible.com/t/ansible-ufw-module-inaccurate-documentation/15817 "2014-07-30T22:48:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lars\_Sommer](https://avatars.discourse-cdn.com/v4/letter/l/aca169/32.png) [@Lars\_Sommer](https://forum.ansible.com/u/Lars_Sommer)\
**Post date:** [July 30, 2014, 10:48pm UTC](https://forum.ansible.com/t/ansible-ufw-module-inaccurate-documentation/15817/1 "2014-07-30T22:48:29Z")

</div>

Having a hell of a time getting UFW to play nicely. Here’s what I’ve got:

Each role (in this case the role is “common”, part of our baseline role) has a ufw.yml task file that gets imported to main.yml:

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [July 31, 2014, 8:47pm UTC](https://forum.ansible.com/t/ansible-ufw-module-inaccurate-documentation/15817/2 "2014-07-31T20:47:32Z")

</div>

With regards to the variable question:

with\_items:

- { ip: “[10.0.0.0/8](http://10.0.0.0/8)”, port: “any” }
- { ip: “[172.16.0.0/12](http://172.16.0.0/12)”, port: “any” }
- { ip: “[192.168.0.0/16](http://192.168.0.0/16)”, port: “any” }
- { ip: “{{ bellevue\_office\_ip }}”, port: “any” }

Can you include the full output from the part about the protocol error?

---

<div class="post-metadata">

**Author:** ![Daniel\_Pool](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@Daniel\_Pool](https://forum.ansible.com/u/Daniel_Pool)\
**Post date:** [July 7, 2016, 8:47pm UTC](https://forum.ansible.com/t/ansible-ufw-module-inaccurate-documentation/15817/3 "2016-07-07T20:47:11Z")

</div>

Realising that by posting I’m very much raising a zombie, but it’s also the first hit on google when searching for the term “ufw Could not find protocol”, and it’s unsolved; an internet pet peeve of mine.

I’ve had a similar instance of this error today; it stems from the fact that you can’t use the keyword ‘any’ for the to\_port or from\_port parameters, it appears the only acceptable values are integers.
