DigitalOcean offers a Cloud Firewall that acts as a firewall outside your server, and can be fully configured using their API. This tool utilizes this API to automatically configure the cloud firewalls to accept connections from your current IP address (both IPv4 and IPv6). It will automatically remove old IP addresses from the firewall as well to improve security.
The goal of this tool is to encourage better security by making the process of managing firewalls and server access management a less of an inconvenience.
The following chart describes a typical scenario:
Read more on the Github project page.