Author

Topic: Dynamic IP change - incoming connections drop (Read 1368 times)

member
Activity: 82
Merit: 13
Bitcoin = Freedom
February 21, 2017, 10:09:47 PM
#11
The reliable solution to your problem is to periodically restart your Bitcoin Core client.
That's what I do with OpenBazaar because they store IPs instead of hostnames in the DHT and I have the exact same problem when my IP changes.

I made this little script for it (in case someone wants to modify it for their bitcoin client):

Code:
#!/bin/sh

# Create log file
LOG="/tmp/ip-check.log"
touch $LOG

IP="$(dig +short myip.opendns.com @resolver1.opendns.com)"
LAST_IP="$(cat $LOG)"

if [ "$IP" != "$LAST_IP" ]; then
    # Save the new IP
    echo "test"
    echo $IP > $LOG

    # Restart OB
    sudo service openbazaar restart
fi

I check for the change every 5 minutes via crontab:

Code:
*/5 * * * * sh /home/user/bin/check.sh >/dev/null 2>&1

The other possibility is to see if your ISP may be supporting mixed IPv4/IPv6 deployment
I checked and my ISP doesn't support IPv6 AFAIK. I'll be restarting my client then.

Thanks!
legendary
Activity: 2128
Merit: 1073
The reliable solution to your problem is to periodically restart your Bitcoin Core client.

I'm assuming that you have one of those PPPoE or PPPoA services that force PPP session renegotiation every 24 hours if you not renegotiate earlier on your own. In that case the best solution is to write a script that periodically:

1) shuts down bitcoin{d,-qt} using bitcoin-cli
2) forces PPP session disconnect and reconnect
3) restarts bitcoin{d,-qt}

This has been working reliably for many users for years now, they get decent bandwidth and transaction propagation.

Depending on the specifics of your ISP this script has to be either:

a) run at fixed time of day with a short (e.g. 1 minute) pause between disconnect and reconnect
b) run on a rolling schedule every 22 (or so) hours
c) run twice daily on a fixed schedule (or better twice nightly)

The other possibility is to see if your ISP may be supporting mixed IPv4/IPv6 deployment (oftentimes it just needs appending something in your PPPoE login e.g. "[email protected]" changes to "[email protected]/ipv6". In that case the PPP session can stay up for weeks or months at a time and oftentimes reconnecting your PPP session doesn't change the assigned IPv4 & IPv6 addresses. The usual consumer-level dual-stack deployments have limitations on IPv4 connectivity but will give you nearly permanent /64 (or /56) of IPv6 address space. Your incoming Bitcoin connection will be then over IPv6.
legendary
Activity: 3486
Merit: 2287
Top Crypto Casino
February 17, 2017, 08:14:22 AM
#9
Have had the same issue with 0.13.1 and opened a ticket: https://github.com/bitcoin/bitcoin/issues/9056
Seems I was al alone with this problem so I decided to go back to 0.12.1 what works flawlessy so far.

But this sounds like a solution
Quote
You could try running the node through a proxy that gives you a static ip address. You could pay a cloud provider like AWS for a very cheap VPS and use that as a proxy.

Maybe I try it again this way, thanks!
full member
Activity: 224
Merit: 100
February 16, 2017, 11:02:41 AM
#8
You could try running the node through a proxy that gives you a static ip address. You could pay a cloud provider like AWS for a very cheap VPS and use that as a proxy.
member
Activity: 82
Merit: 13
Bitcoin = Freedom
February 16, 2017, 08:58:32 AM
#7
I don't think setting up dynamic DNS records for his node is going to help him anyhow with this issue.

I don't think so either.

I don't know much about bitcoin core, but it might have something to do with it being unable to notice your IP changes.
Maybe it's better to ask on the support forum.
Moved.
legendary
Activity: 2053
Merit: 1356
aka tonikt
February 16, 2017, 08:54:45 AM
#6
I don't think setting up dynamic DNS records for his node is going to help him anyhow with this issue.

I don't know much about bitcoin core, but it might have something to do with it being unable to notice your IP changes.
Maybe it's better to ask on the support forum.
member
Activity: 82
Merit: 13
Bitcoin = Freedom
February 16, 2017, 06:17:42 AM
#5
Just run it on the same machine as your node.
What do you mean by "it"? I run NOIP DUC (dynamic updater client) and it updates the IP for my hostname just fine. But I don't think my node is visible on the network as a hostname, but as an IP instead.
legendary
Activity: 1442
Merit: 1186
February 15, 2017, 11:40:24 PM
#4
Just run it on the same machine as your node. It will automatically update every time your router changes it's IP. Other peers will still just connect to the same static IP provided by noip. 
member
Activity: 82
Merit: 13
Bitcoin = Freedom
February 15, 2017, 09:07:29 PM
#3
I already use noip for stats on bitnodes to be visible under a single host regardless of the IP. But how do you setup a node to get use of it?

Can you simply add bind= to bitcoin.conf?
legendary
Activity: 1442
Merit: 1186
February 15, 2017, 08:32:21 PM
#2
Common issue for nodes or when running a web server from home. Take a look at NOIP dynamic DNS. http://www.noip.com/support/knowledgebase/getting-started-with-no-ip-com/

I have no affiliation with NOIP, but I have used them in the past which is why I'm recommending them as a solution. Good luck!
member
Activity: 82
Merit: 13
Bitcoin = Freedom
February 15, 2017, 08:07:58 PM
#1
I have a spare macbook pro which I dedicated to running full bitcoin node (along with other decentralized services).

I've opened 8333 on my router and got around 20 connections yesterday (I'm still syncing the chain) but after a dynamic IP change this morning, it dropped back to 8 with no incoming traffic whatsoever. The node also appeared offline on bitnodes.21.co.

I found a 2 yo thread describing the same issue so I'm wondering if it was fixed or there's nothing I can do about it (static IP is not a possibility in my case)?

// edit I run 0.13.2
Jump to: