How to find your private IP address on DigitalOcean?

I did the tutorial on setting up the node.js application on my virtual server, the problem is that I cannot get my private IP address.

Is it a configuration problem, or is my drop in the digital ocean a problem?

So far I have been using ssh to connect, install fail2ban and configure iptable.

curl -w "\n" http://myipAddress/metadata/v1/interfaces/private/0/ipv4/address
<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.4.6 (Ubuntu)</center>
</body>
</html>

What I did during the tutorial: how to set up the ubuntu environment and use fail2ban, iptable for firewall purposes

-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-N fail2ban-ssh
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m multiport --dports 22 -j fail2ban-ssh
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -j DROP
-A fail2ban-ssh -s 29.248.168.45/32 -j REJECT --reject-with icmp-port-unreachable
-A fail2ban-ssh -j RETURN
+4
source share
1 answer

, API DigitalOcean, IP-. , IP- , IP-. , :

curl -w "\n" http://169.254.169.254/metadata/v1/interfaces/private/0/ipv4/address

eth1, IP-:

ifconfig eth1

DigitalOcean Droplet:

IP adder

+9

Source: https://habr.com/ru/post/1607197/


All Articles