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

What are the darkcoin.conf IP settings for a tMN in a VirtualBox VM ? (How to forward port 19999?)

Nthelight

Member
WAN Router --> Ubuntu 14.04 host machine running VirtualBox --> Ubuntu Server 14.04.1 guest VM (Bridged network adapter)
Public IP address/192.168.1.1 --> 192.168.1.11 (HOST) --> 192.168.1.2 (GUEST)

What are the correct settings to be used for the darkcoin.conf file for in below configuration options in darkcoin.conf:
externalip= <--- in my setup, is this the public IP address of my WAN router?
masternodeaddr= <--- in my setup, is this the public IP address of my WAN router or is this the local IP address of the test MN (guest VM)?

I tried various options, but the https://test.drk.mn/masternodes.html site however always marks my test MN as 'Closed':
192.168.1.2:19999 Closed (3m48s) Timeout mmxMCT7LwKEUjwURCdQMj2vSkqp2rkr37s[1][2][3] 1000.000000000 1h27m50s 7s Unknown Active Active Active Active Active Active Active Active Unlisted

This means I can send traffic out from the daemon, but I can't receive traffic in, however I disabled all firewalls (router/host/guest) for root cause analysis, to no avail.

I would like to get a hard confirmation on the IP settings to be used for darkcoin.conf, so I can move on...

Thanks,
Nthelight
 
Hmmm externalip should be public ip.
And router should forward incoming port 19999 to internal host, internal host should forward incoming port 19999 to guest 19999.
 
Thanks chaeplin, I'll set my darkcoin.conf to the following settings and will retry.

externalip=x.x.x.202 (=my public IP address retrieved from whatismyipaddress.com)
masternodeaddr=192.168.1.11:19999 (=HOST IP address) (<-> NOT the Guest VM IP address)

If it doesn't work, I can continue investigating my firewall/port forwarding settings and at least be reassured that the darkcoin.conf is configured properly.
 
Thanks chaeplin, I'll set my darkcoin.conf to the following settings and will retry.

externalip=x.x.x.202 (=my public IP address retrieved from whatismyipaddress.com)
masternodeaddr=192.168.1.11:19999 (=HOST IP address) (<-> NOT the Guest VM IP address)

If it doesn't work, I can continue investigating my firewall/port forwarding settings and at least be reassured that the darkcoin.conf is configured properly.
masternodeaddr can be public ip, if router forward 19999 to internal
 
genusr@drktmn1:~$ cat .darkcoin/darkcoin.conf
rpcuser=<removed>
rpcpassword=<removed>
rpcallowip=127.0.0.1
testnet=1
listen=1
server=1
daemon=1
logtimestamps=1
maxconnections=256
externalip=x.x.x.202 (changed)
masternode=1
masternodeaddr=192.168.1.11:19999
masternodeprivkey=<removed>


Router: 192.168.1.1

Option LAN Servers:
Name Activated Protocol Public start port Public end port LAN start port Local IP Address
drktmn1 Yes TCP 19999 19999 19999 192.168.1.11
drktmn1 Yes UDP 19999 19999 19999 192.168.1.11

Host machine: 192.168.1.11
u@ubuntu:~$ sudo iptables -L
[sudo] password for u:
Chain INPUT (policy ACCEPT)
target prot opt source destination
ufw-before-logging-forward all -- anywhere anywhere
ufw-before-forward all -- anywhere anywhere
ufw-after-forward all -- anywhere anywhere
ufw-after-logging-forward all -- anywhere anywhere
ufw-reject-forward all -- anywhere anywhere
ufw-track-forward all -- anywhere anywhere

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ufw-before-logging-output all -- anywhere anywhere
ufw-before-output all -- anywhere anywhere
ufw-after-output all -- anywhere anywhere
ufw-after-logging-output all -- anywhere anywhere
ufw-reject-output all -- anywhere anywhere
ufw-track-output all -- anywhere anywhere

Chain ufw-after-forward (1 references)
target prot opt source destination

Chain ufw-after-input (1 references)
target prot opt source destination

Chain ufw-after-logging-forward (1 references)
target prot opt source destination

Chain ufw-after-logging-input (1 references)
target prot opt source destination

Chain ufw-after-logging-output (1 references)
target prot opt source destination

Chain ufw-after-output (1 references)
target prot opt source destination

Chain ufw-before-forward (1 references)
target prot opt source destination

Chain ufw-before-input (1 references)
target prot opt source destination

Chain ufw-before-logging-forward (1 references)
target prot opt source destination

Chain ufw-before-logging-input (1 references)
target prot opt source destination

Chain ufw-before-logging-output (1 references)
target prot opt source destination

Chain ufw-before-output (1 references)
target prot opt source destination

Chain ufw-reject-forward (1 references)
target prot opt source destination

Chain ufw-reject-input (1 references)
target prot opt source destination

Chain ufw-reject-output (1 references)
target prot opt source destination

Chain ufw-track-forward (1 references)
target prot opt source destination

Chain ufw-track-input (1 references)
target prot opt source destination

Chain ufw-track-output (1 references)
target prot opt source destination
u@ubuntu:~$ sudo ufw status
Status: inactive

Guest VM: 192.168.1.2
genusr@drktmn1:~$ ./darkcoind-0.10.12.10
genusr@drktmn1:~$ DarkCoin server starting

genusr@drktmn1:~$ ./darkcoind-0.10.12.10 masternode start <MYTESTMNPASSWORD>
inbound port is not open. Please open it and try again. (19999 for testnet and 9999 for mainnet)
genusr@drktmn1:~$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
genusr@drktmn1:~$ sudo ufw status
Status: inactive
genusr@drktmn1:~$

Even when I disable the firewall of the WAN router, I still receive the same message.
 
Last edited by a moderator:
I've now also tried with the following setting:
externalip=x.x.x.202 (changed)
masternodeaddr=x.x.x.202:19999

genusr@drktmn1:~$ ./darkcoind-0.10.12.10 masternode start <MYTESTMNPASSWORD>
inbound port is not open. Please open it and try again. (19999 for testnet and 9999 for mainnet)

I'll continue to investigate my router port forwarding settings...
 
internal host should forward incoming port 19999 to guest 19999.

Suppose the port forwarding on my router is correct..

How do you set up the port forwarding from the host machine to the guest VM ?

VirtualBox \ Network \ Adapter 1
Enable Network Adapter
Attached to Bridged Adapter
Name eth0

Port forwarding button is greyed out...

That might be the issue?

OK, I'm investigating... (https://www.virtualbox.org/manual/ch06.html)
 
Suppose the port forwarding on my router is correct..

How do you set up the port forwarding from the host machine to the guest VM ?

VirtualBox \ Network \ Adapter 1
Enable Network Adapter
Attached to Bridged Adapter
Name eth0

Port forwarding button is greyed out...

That might be the issue?

OK, I'm investigating... (https://www.virtualbox.org/manual/ch06.html)
iptables DNAT will do. check dnat.

Does host and guest has same subnet ?

192.168.1.11 (HOST) --> 192.168.1.2 (GUEST)

Looks like bridged ?


I suggest this.

Run Masternode remore in Host, run cold wallet in guest.
Router forward to Host, no need to forward to cold wallet.
 
darkcoin.conf
externalip=x.x.x.202 (public IP)
masternodeaddr=x.x.x.202:19999 (public IP)

Using Bridged Network Adapter (Port Forwarding greyed out in VirtualBox)
:


SSH session from Host machine to Guest VM:

genusr@drktmn1:~$ ./darkcoind-0.10.12.10
genusr@drktmn1:~$ DarkCoin server starting

genusr@drktmn1:~$ ./darkcoind-0.10.12.10 masternode start <MYTESTMNPASSWORD>
inbound port is not open. Please open it and try again. (19999 for testnet and 9999 for mainnet)
genusr@drktmn1:~$

genusr@drktmn1:~$ netstat -plant | grep -i :19999
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:19999 0.0.0.0:* LISTEN 1368/darkcoind-0.10
tcp 0 0 192.168.1.2:37641 107.191.58.84:19999 ESTABLISHED 1368/darkcoind-0.10
tcp 0 0 192.168.1.2:57842 178.33.36.122:19999 ESTABLISHED 1368/darkcoind-0.10
tcp 0 0 192.168.1.2:41205 87.98.226.89:19999 ESTABLISHED 1368/darkcoind-0.10
tcp 0 0 192.168.1.2:50487 54.202.29.136:19999 ESTABLISHED 1368/darkcoind-0.10
tcp 0 0 192.168.1.2:37010 104.33.210.231:19999 ESTABLISHED 1368/darkcoind-0.10
tcp 0 0 192.168.1.2:35585 112.175.123.94:19999 ESTABLISHED 1368/darkcoind-0.10
tcp 0 0 192.168.1.2:57844 211.99.224.173:19999 ESTABLISHED 1368/darkcoind-0.10
tcp 0 0 192.168.1.2:49234 37.59.168.129:19999 ESTABLISHED 1368/darkcoind-0.10
tcp6 0 0 :::19999 :::* LISTEN 1368/darkcoind-0.10

genusr@drktmn1:~$ netstat -plant | grep -i :22122
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:22122 0.0.0.0:* LISTEN -
tcp 0 0 192.168.1.2:22122 192.168.1.11:38382 ESTABLISHED -
tcp6 0 0 :::22122 :::* LISTEN -

genusr@drktmn1:~$ sudo ufw status
[sudo] password for genusr:
Status: inactive

Using NAT (Port Forwarding enabled in VirtualBox):

Port Forwarding Rules in VirtualBox settings (GUI):

Name Protocol Host IP Host Port Guest IP Guest Port
Darkcoin TCP 192.168.1.11 19999 10.0.2.15 19999
SSH TCP 192.168.1.11 22122 10.0.2.15 22122

I updated my .ssh/config to use the Guest IP 10.0.2.15, but unfortunately I'm unable to login to my Guest VM through SSH (connection times out).

When I log in directly to my Guest VM (using VirtualBox) and start the darkcoin daemon I receive the same error:

genusr@drktmn1:~$ ./darkcoind-0.10.12.10 masternode start <MYTESTMNPASSWORD>
inbound port is not open. Please open it and try again. (19999 for testnet and 9999 for mainnet)
 
Last edited by a moderator:
darkcoin.conf: (using NAT)
externalip=x.x.x.202 (public IP)
masternodeaddr=10.0.2.15:19999 (local IP NAT)

genusr@drktmn1:~$ ./darkcoind-0.10.12.10 masternode start <MYTESTMNPASSWORD>
successfully started masternode

Not sure if it works, but I can retrieve the masternode list (test MNs) which also shows my test MN with "10.0.2.15:19999".

Waiting to see if my test MN shows up on : https://test.drk.mn/masternodes.html

10 minutes later:
Masternode IP:port Port Check (Last checked) Version Masternode Pubkey Balance Active Duration Last Seen Country Status

10.0.2.15:19999 Closed (2m48s) Timeout mmxMCT7LwKEUjwURCdQMj2vSkqp2rkr37s[1][2][3]
1000.000000000 3m53s Unknown Active Active Active Active Active Active Active Active Active

Note: I also added the following port forwarding rule to VirtualBox NAT (not sure if this made any difference or if it is required):
Darkcoin UDP 192.168.1.11 19999 10.0.2.15 19999
 
Last edited by a moderator:
If you setup bridged networking in virtualbox the Guest OS will appear like a second System to your Router and the guest will get an own IP adresse. So if any you need to set up NAT Portforwarding for your GUEST and not the HOST.
 
Back
Top