Send Outbound Traffic Over a Reserved IP with a Custom Image


The “Send Outbound Traffic Over a Reserved IP” ( document mentions for custom images that there is no anchor IP, but yet that is what must be used to send traffic out over the reserved IP.

The explanation of Anchor IP (from, says “Droplets created from custom images do not require an anchor IP to use a reserved IP, instead the reserved IP maps to the Droplet’s public IP address by default.”

I’m trying to confirm if it is tested and expected to work that custom images can send outbound traffic over a reserved IP? And if so, do they need to go through the instructions to enable Anchor IPs (

I was able to find an Anchor IP, but was having trouble getting routing to work (but I’m new to custom images and having multiple network ports - I see the the loopback, public IP and private IP before I try to add anchor IP).

I likely have something wrong in my setup, but just wanted to confirm it should be possible.


Show comments

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Found the solution. the IP addr to assign to eth0 is what returns from ( in this example) and the default GW should be what is returned from ( in this example).

To avoid severing your network connection if something fails, I’d recommend add a non-default route to one specific IP first, for example:

host has address

ip route add via dev eth0 Then, to test that it worked: curl Once this works: ip addr add dev eth0 route add default gw And: route del default gw $ORIGINAL_GW

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel