• Forum has been upgraded, all links, images, etc are as they were. Please see Official Announcements for more information

IPV6 addresses

jimbit

Active member
Foundation Member
Is it possible to set up a MasterNode using and IPV6 address?

this looks promising:

dash-cli masternode status
{
"vin" : "CTxIn(COutPoint(a882fefaacf811142eca5650c4325e92361aedf36e3eaaf3325714e95581f629, 0), scriptSig=)",
"service" : "[2001:470:b:73b:250:56ff:fe0c:3a3d]:19999",
"pubKeyMasternode" : "y1gKw5sVPUbHowJmpCTWiGUQ8NjR8hRBD3",
"status" : "Masternode successfully started"


edit2:
ipv6 is working, although no payment yet... and I am having a little trouble with 9999.. and dashninja has altered the site to handle it properly: Thank you Elbo!
 
Last edited by a moderator:
Is it possible to set up a MasterNode using and IPV6 address?

this looks promising:

dash-cli masternode status
{
"vin" : "CTxIn(COutPoint(a882fefaacf811142eca5650c4325e92361aedf36e3eaaf3325714e95581f629, 0), scriptSig=)",
"service" : "[2001:470:b:73b:250:56ff:fe0c:3a3d]:19999",
"pubKeyMasternode" : "y1gKw5sVPUbHowJmpCTWiGUQ8NjR8hRBD3",
"status" : "Masternode successfully started"


edit2:
ipv6 is working, although no payment yet... and I am having a little trouble with 9999.. and dashninja has altered the site to handle it properly: Thank you Elbo!

Did you have to do anything special on your MN host or did it automatically bind to port 9999 for your IPv6 range?

If yes, did you just have to change your masternode.conf to an ipv6 instead of ipv4 address?
 
Ok, answered my own question. Got it to work exactly as described above in testnet, just changed to IPv6 in masternode.conf.
 
Good.

My IPV6 nodes have been running great since I migrated to my new hosting a couple of months ago.. payments look OK.
 
Good.

My IPV6 nodes have been running great since I migrated to my new hosting a couple of months ago.. payments look OK.

So this works! Is this all you need for your configs?
Server
bindip=xx:xx:xx:xx:xx:xx:xx
externalip=xx:xx:xx:xx:xx:xx:xx:9999
Wallet
1 xx:xx:xx:xx:xx:xx:xx:9999 asdfasdfasdffasdf aasdfasdf 0

Then you should be able to use 6tunnel to forward the IPv6 9999 port to a different port on ipv4. VPS hosts are getting picky about IPV4 addressees even requiring customer/website names.
 
So this works! Is this all you need for your configs?
Then you should be able to use 6tunnel to forward the IPv6 9999 port to a different port on ipv4. VPS hosts are getting picky about IPV4 addressees even requiring customer/website names.

I don't understand forwarding IPv6 9999 port to an IPv4 port... what is this trying to accomplish?

This is all I have in my mn config, and you can even leave out the rpc stuff:

Code:
listen=1
daemon=1
logtimestamps=1
maxconnections=256
server=1
rpcuser=XXXXXXXXXXXX
rpcpassword=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
rpcallowip=127.0.0.1
masternode=1
masternodeprivkey=7XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Note that when I set up the IPv6 node, I didn't alter the MN server setup at all (IPv6 port 9999 is already open). All I did was changed the masternode.conf on my local hot wallet to be an IPv6 address instead of IPv4. The dashd binds to both IPv4 and IPv6, it looks like from the debug.conf....

Code:
2015-10-27 XX:XX:XX AddLocal(XXX.XXX.XXX.XXX:9999,1)
2015-10-27 XX:XX:XX Discover: IPv4 eth0: XXX.XXX.XXX.XXX
2015-10-27 XX:XX:XX AddLocal([X:X:X:X::X:X]:9999,1)
2015-10-27 XX:XX:XX Discover: IPv6 eth0: X:X:X:X::X:X
 
Thanks for your config info.
The reason for the bind ip, ports and the 6tunnel is if you want to run more than one node on a server. You can run 3 nodes on 1GB ram/1GB Swap, 7 nodes on 2GB/2GB. Typically, a VPS will give you only 1 or 2 ipv4 addresses and a bunch of ipv6. So you would have a main ip(probably the ipv4). You would forward all the 9999 and 9998 ports from the ipv6 addresses to a different port (like 9997/9996) for each node on the main ip. A little complicated. I bet if you put the bind ip on the server side you can force one node to use the ipv4 and another to use the ipv6 address(with a different port) effectively giving you two ips. That is why this is interesting!

Of course, An ipv6 may also require a dedicated IPV4 to bind with like you indicated, but I will see if I can make this work without.
 
Thanks for your config info.
The reason for the bind ip, ports and the 6tunnel is if you want to run more than one node on a server. You can run 3 nodes on 1GB ram/1GB Swap, 7 nodes on 2GB/2GB. Typically, a VPS will give you only 1 or 2 ipv4 addresses and a bunch of ipv6. So you would have a main ip(probably the ipv4). You would forward all the 9999 and 9998 ports from the ipv6 addresses to a different port (like 9997/9996) for each node on the main ip. A little complicated. I bet if you put the bind ip on the server side you can force one node to use the ipv4 and another to use the ipv6 address(with a different port) effectively giving you two ips. That is why this is interesting!

Of course, An ipv6 may also require a dedicated IPV4 to bind with like you indicated, but I will see if I can make this work without.

I had no idea about the stats on how many MNs can be run based on amount of memory, etc, but was wondering about that, thank you!

So, most of that tunnelling stuff doesn't make sense to me, but I don't think it's required.

Lemme try & do this on testnet... and I'll get back real quick... I think it's as simple as binding to a different ipv6 address/port 9999 for each dashd process. Will get back w/you soon on this.
 
Note that when I set up the IPv6 node, I didn't alter the MN server setup at all (IPv6 port 9999 is already open). All I did was changed the masternode.conf on my local hot wallet to be an IPv6 address instead of IPv4. The dashd binds to both IPv4 and IPv6, it looks like from the debug.conf....

Code:
2015-10-27 XX:XX:XX AddLocal(XXX.XXX.XXX.XXX:9999,1)
2015-10-27 XX:XX:XX Discover: IPv4 eth0: XXX.XXX.XXX.XXX
2015-10-27 XX:XX:XX AddLocal([X:X:X:X::X:X]:9999,1)
2015-10-27 XX:XX:XX Discover: IPv6 eth0: X:X:X:X::X:X

Ok, correcting my own mistakes here...

... first, it's debug.log, not debug.conf, just caught that.

Second, I don't think those AddLocal or Discover lines are the bind addresses. Grep for 'Bound' in debug.log to see what dashd actually binds to (addresses & ports).

Code:
2015-10-27 XX:XX:XX Bound to [::]:9999
2015-10-27 XX:XX:XX Bound to 0.0.0.0:9999

You can use telnet to test if it's bound, and telnet has a -6 option for IPv6.

Add this line below in dash.conf to bind ONLY to that specific IPv6 port/address (obviously use the right port for mainnet/testnet).

Code:
bind=[X:X:X:X::X:X]:19999
 
Yep! It works on testnet.

So, in summary: IPv4 not required for anything really. No tunneling, none of that.

1. Just have separate IPv6 addresses setup correctly on your host.
2. Bind to a certain IPv6 address for each dashd process, e.g.:

Code:
bind=[address1]:9999

...and in a different config file for a different process:

Code:
bind=[address2]:9999

... and that's it. Set up your local masternode.conf correctly, ensure the port is open for IPv6 on your firewall and you should be good. At least, it worked for me on testnet.
 
Binding to an ipv6 then it looks like this should work. This is really good news since ipv4 addresses are running out. Thanks for investigating.

If you want to run 2 or more nodes on the same server then you need to forward ports. For a VPS you can use iptables to move ports on ipv4 addresses. I have done this and it works well. If you you only have ipv6 ports, you should also be able to use iptables to forward ports.

But when you forward ipv6 ports onto an ipv4 address you need a different program - I think 6tunnel would work. I will give it a try on the next change I make to my vps nodes when I one of my extra ipv4 addresses expire.
 
If you want to run 2 or more nodes on the same server then you need to forward ports. For a VPS you can use iptables to move ports on ipv4 addresses. I have done this and it works well. If you you only have ipv6 ports, you should also be able to use iptables to forward ports.

But when you forward ipv6 ports onto an ipv4 address you need a different program - I think 6tunnel would work. I will give it a try on the next change I make to my vps nodes when I one of my extra ipv4 addresses expire.

Mm.... nope, what I'm trying to say in the posts above is that I just successfully started two masternodes on the same host without forwarding ports. So that's not the case at all.

Each IP address (v4 or v6) has its own ports, so these below are the same exact machine, same port #, but different IPv6 addresses:

Code:
2604:a880:0:1010::4b:e000]:19999
2604:a880:0:1010::4b:e002]:19999

This is from masternodelist full on testnet:

Code:
{
"104093976473e05c79e521ab9e1cda21c2e55d82757aacc323939102a85f1372-1" : " ENABLED 70103 y3BcSAaSz9vnnpCWHREtHADD3s5aKgwg6a [2604:a880:0:1010::4b:e000]:19999 1448058227 20102 1448052155",
"4c1acd2ace309d3c1a237ee3cc9271e7c9ab10c2a689a1342f17c7cc08f97c50-1" : " ENABLED 70103 xxXx55Pbc1RcmcW9GC2skhziuheaBv4CWS [2604:a880:0:1010::4b:e002]:19999 1448058159 15630 1448055651"
}

Notice those IPv6 addresses? Same machine, no port forwarding. Only difference is the e000 and e002 address at the end -- I set up two alternate IPv6 addresses on the same eth0 device on my VPS.

IPv4 has nothing to do with any of it.
 
Or, maybe you meant for IPv4 addresses, in which case, yeah, maybe. IPv6 solves the problem.
 
I thought if you run nodes with listen=1 it won't let you run 2 nodes at the same time with the same port (9999). IPV6 may be different, don't know.
 
I thought if you run nodes with listen=1 it won't let you run 2 nodes at the same time with the same port (9999). IPV6 may be different, don't know.

How would it know that both IPv6 addresses are on the same host?

edit: clarity
 
I thought if you run nodes with listen=1 it won't let you run 2 nodes at the same time with the same port (9999). IPV6 may be different, don't know.
It should work with IPv4 as well, providing you can get 2 or more IPv4 addresses for the same server. But VPS providers are making it harder these days & it costs. IPv6 addresses are plenty, so free. I get 16 IPv6 addresses per server with my VPS.
 
Try to run 2 wallets on windows. It will say wallet is already running when you start the second. If you change ports in one dash.conf both will be able to start.
 
Try to run 2 wallets on windows. It will say wallet is already running when you start the second. If you change ports in one dash.conf both will be able to start.

Which ports exactly? RPC or the dash server itself?

Port 9999 on one IP address is not the same as port 9999 on a different IP address even if they're the same machine. Same for all ports. But if you're enabling RPC interface on 127.0.0.1, then yeah, it will need different ports for that.

So if you add a specific bind directive for each IP address and disable JSON-RPC, then you should be able to do it using IPv4 without forwarding ports. If you want RPC you could bind to those external addresses also, but that's not secure. I guess you could firewall it.
 
Interesting.... So you can run a masternode without using the RPC stuff. I still need to use it for the Dashwhale notifier though.

Not secure. Someone would need your user/password to to anything. And even then, what is the worst that could happen, they shutdown your masternode?
 
Someone would need your user/password to to anything. And even then, what is the worst that could happen, they shutdown your masternode?

They might be able to DOS/DDOS it. And if you're not serving it over https, someone could sniff your username/password.

edit: add https note
 
Back
Top