How to monitor ISP changes?

Hi Everyone,

My node was offline for about a day and I only found out today. I realized that my ISP had changed my IP. Not a big issue, fixed it by pointing my hostname to the new IP, and its back online for now. Hopefully no issues, :crossed_fingers:

But my question is, is there a way to prevent this or monitor this change for the future?

Long time SNO, don’t want to lose my node haha.

Use a ddns service if you have a dynamic IP address which is free to use. Also you can use uptimerobot to keep track of the uptime of your node.

1 Like

I am using a ddns service, I use no-ip. But I had to change the external IP it points to manually.

I guess I need to install the ‘dynamic update client’ on my node from no-ip to detect the change and update the hostname pointer automatically.

Ok thanks, will look into uptime robots. Any suggestions?

1 Like

nvm, I found ‘uptimerobot’, thanks

Or even better - to enable it on your router. But use only one method - either DUC or your router to do not introduce collisions.

2 Likes

This actually brings up a question/setup method that I’ve been thinking about trying where a script/service is used to periodically poll an external site detect an IP address change. If a change is detect it could remove the old docker container and recreate it with the new IP address passed in, either through a docker-compose variable file or by passing it into a docker run command.

The command to get the IP would likely look something like this:

curl -s https://checkip.amazonaws.com

A service (or cronjob) could be added that saves the external IP to a file and checks to see if the current IP address differs; if a change is detected it will delete the docker container and recreate it with something like the below command:

MY_EXTERNAL_IP=$(curl -s https://checkip.amazonaws.com)

# Launch a docker container with a variable for the external IP address
docker run -d --restart always --stop-timeout 300 \
    -p 28967:28967/tcp \
    -p 28967:28967/udp \
    -p 14002:14002 \
    -p 127.0.0.1:5999:5999 \
    -e WALLET="<wallet address>" \
    -e EMAIL="<email>" \
    -e ADDRESS="$MY_EXTERNAL_IP:28967" \
    -e STORAGE="8TB" \
    --mount type=bind,source="/<path>/storagenode/Identity",destination=/app/identity \
    --mount type=bind,source="/<path>/storagenode/data",destination=/app/config \
    --name storagenode storjlabs/storagenode:latest \
    --debug.addr=":5999" \
    --log.level error

Does anyone know if the satellites have issues with the associated IP/domain name changing (I doubt it would occur very often, but I have seen DSL connections that get a new IP whenever the modem is powercycled (intermittent power could cause multiple IP changes in a day))? This might be a step towards creating a more generic launcher that doesn’t require a person to have a domain name or use a DDNS service.

Starting and stopping a node to update the ipaddress seems like it would be a bad idea espically if your ip changes alot, You would trigger a file walker during this and have less performance over all. Using a DDNS is a much better idea for a node since all you have to do is update the ddns and your good to go.

I think leaving the container running is still better then stopping and removing it and starting it again. It would probably be better if the node itself checked the new IP if that ever becomes a thing.

2 Likes

That is a good point about the file walker; adding an optional self update ip flag and possibly a flag to specify the site/service to check against would be kind of nice.

Too complicated solution for the solved problem. Why do not setup DDNS right on your router instead of custom implementation of existing service?

2 Likes

ok thanks @Alexey

@Doom4535 Though it might be cool to implement the scripts :wink: , it might be easier just to implement DUC and have uptimerobot as your monitor. Might be safer too rather than removing and creating containers many times.

Uptimerobot was easy to set up and I can monitor my node on my phone too. Thanks for the suggestion @deathlessdd

2 Likes

An autoupdate of the external IP whould be awsome. I change my node’s location from time to time, because of the power outages, and I don’t want to use any ddns service. The ddns adds useless lag and you loose engress. The Internxt nodes dosen’t even work with ddns services because of this lag. Checking the IP and autoupdate it at an interval of minimum 1 hour would be very usefull and would make the storagenode more independant and more portable. No need for external services.

I think you mix up VPN with DDNS. The later does not add latency other than a DNS query on the client’s side.

3 Likes

To further your point, my understanding is that the satellites now cache the IP address of nodes and pass the IP to the client side. So there would actually be zero added latency as the client doesn’t need to do any DNS lookups to connect with nodes.

2 Likes