Report this

What is the reason for this report?

doctl compute firewall create gives error: "missing name"

Posted on August 1, 2018

I got a droplet: Ubuntu 16.04 (One-click-apps NodeJS 6.12.3 with monitoring)

I have setup a tag for that droplet: gmseserver All good, you can see it it the control panel.

doctl is installed via snap (version: doctl version 1.8.2-stable)

Now when I try to setup a firewall:

doctl compute firewall create --name "server-firewall" --tag-names "gmseserver" --inbound-rules "protocol:tcp,ports:22,address:0.0.0.0/0,address:::/0" --outbound-rules "protocol:icmp,address:0.0.0.0/0,address:::/0 protocol:tcp,ports:all,address:0.0.0.0/0,address:::/0 protocol:udp,ports:all,address:0.0.0.0/0,address:::/0"

Taken from: https://www.digitalocean.com/community/tutorials/how-to-secure-web-server-infrastructure-with-digitalocean-cloud-firewalls-using-doctl

I get the error:

Error: POST https://api.digitalocean.com/v2/firewalls: 422 (request "864bf621-d9a2-46d9-a652-f74b14ebd3f5") missing name

Tested to set the name as serverfirewall don’t help. Tested to use --droplet-ids <DROPLET ID> instead don’t help. Tested to remove each space and put a new space in place (in case of hidden chars) Same error on all tests.

I use Putty with SSH.

What could be the problem?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello, @Knight81

Can you try to use the same command but with the name not in quotes, e.g

doctl compute firewall create --name firewall_name

Let me know how it goes.

Regards, Alex

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.