fastly-magento2 icon indicating copy to clipboard operation
fastly-magento2 copied to clipboard

Feature Request - CLI to block an IP address

Open mpchadwick opened this issue 5 years ago • 3 comments

Use case: Often times when we need to block an IP the system is under such high load that it's impossible to follow these steps to block a bad acting IP address via the Magento Admin panel (admin panel is unreachable / unusable due to high load). In these cases it would be useful to have a CLI that can be used to block a bad acting IP.

E.g.

php bin/magento fastly:block <ip-to-block>

As the "Blocking" feature may potentially be in "Allowlist" state it's probably better if this CLI would implement the block via an Edge ACL + Custom VCL Snippet

mpchadwick avatar Oct 17 '20 01:10 mpchadwick

Hi Fastly! Any chance of getting this implemented?

Leland avatar Apr 20 '21 17:04 Leland

If under such a situation, you may don't have access to the server (SSH) either due to overload. That said, having additional Magento commands doesn't seem to be the right solution here.

Generally speaking, you should utilize our public API.

We have a Postman collection: https://developer.fastly.com/reference/api/#postman-collection and also, our official Fastly CLI that supports multiple platforms: https://developer.fastly.com/reference/cli/

You can manipulate your Edge ACLs using those tools.

smaeda-ks avatar Sep 10 '21 14:09 smaeda-ks

If under such a situation, you may don't have access to the server (SSH) either due to overload. That said, having additional Magento commands doesn't seem to be the right solution here.

Generally speaking, you should utilize our public API.

We have a Postman collection: https://developer.fastly.com/reference/api/#postman-collection and also, our official Fastly CLI that supports multiple platforms: https://developer.fastly.com/reference/cli/

You can manipulate your Edge ACLs using those tools.

True and we have done that for sure but in all cases where we had a bad actor we still had SSH access to the server and it would have been way quicker to do it with a CLI command. I can understand though if you don't want to do it since there are other methods.

beechyrb avatar Sep 10 '21 17:09 beechyrb