Answer the question
In order to leave comments, you need to log in
How to assign a Floating IP in Digital Ocean to a Droplet (instance) that is more than 5 years old?
Hello guys
, I have a droplet DO assigned it a floating ip (in the control panel) but since it is more than 5 years old,
according to the instructions , you need to assign an internal address to it.
he recognizes the commands
curl -s 169.254.169.254/metadata/v1/interfaces/public/0/an...with /netmask and /gateway substitution and is written with a
sudo ip addr add 198.51.100.0/16 dev eth0
Answer the question
In order to leave comments, you need to log in
Solution:
find the internal IP
curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/anchor_ipv4/address
находим маску
curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/anchor_ipv4/netmask
и гетвей
curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/anchor_ipv4/gateway
sudo ip addr add "найденный айпи/найденная маска подесети" dev eth0
route add -net "найденный айпи/найденная маска подесети" gw "найденный шлюз" dev eth0
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question