Floating IP Anchor Subnet?

Posted December 12, 2015 3.3k views

What is the anchor ip subnet? Right now I’m losing access when using images if it changes from what I had ufw set to. What should I use to let ufw use any anchor? It’d be easy if i could use an interface but I can’t. Thanks.

To Action From 22/tcp ALLOW Anywhere

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.

Submit an Answer
1 answer


Can you go into a bit more detail what you are trying to do? If you are setting this up through a script, I would suggesting using the metadata to grab the anchor IP.

You can grab it with
and it will return the anchor IP for the droplet. This would allow you to set this directly as opposed to setting a range that can vary based on region and other unpredictable factors.

If this doesn’t work, please go into a bit more information on what exactly you are trying to do and perhaps a more specific solution can be offered.

Edited for errors.

  • Thanks I ended up using 22/tcp ALLOW Anywhere

    • Hello,

      That will work too, just keep in mind that opens up the private IP as well (if you have it configured) as the private IP uses the same 10.* addresses. just something to keep in mind if you are also enabling private networking for the droplets.