<p>I am glad to say I found a solution. It is quite trivial:
<br> The main PC, the main node, should be listening for others, therefore you need to add a command:
<br></p>

<pre><code>listen=1 
</code></pre>

<p><br>In addition, I would suggest you to add following commands as well, but for all nodes:
<br></p>

<pre><code>testnet=1
testnet_config=1
</code></pre>

<p>Good luck everyone. </p>

CC BY-SA 3.0
2014-02-15T06:17:14.553Z
2014-02-15T06:17:14.553Z
Nur
<p>I was trying to clone an altcoin for educational purposes. I am total newby and I've got some plans to implement different PoW and continue working on cryto-currencies. </p>

<p>I followed the <a href="http://devtome.com/doku.php?id=scrypt_altcoin_cloning_guide&amp;rev=1391981820" rel="nofollow">cloning guide by Shakezula</a>.</p>

<p>I followed all steps in the guide, however I am losing the main point: thus I am unable to connect machines to start mining. Can anyone please explain what I am doing incorrectly? I am struggling with this and am really looking forward to understand.</p>

<p>What I do not understand is the point on port forwarding from Shakezula's guide:</p>

<blockquote>
  <p>Side note: because I use a VPS for this, I don't really need to worry
  about port forwarding at that end. On the home PC, you will want to
  forward the port you chose for P2Pport in the cut and paste section to
  the PC you're using. For this example, that is port 55884.</p>
</blockquote>

<p>What does it mean?  Does it mean that I should add this port in .conf file of the machines?</p>

<p>My case:</p>

<ul>
<li>I am trying to connect compiled coins on two VM machines: VM1 with IP <code>192.168.122.121</code> &amp; VM2 with IP <code>192.168.122.158</code> (they are able to ping each other)</li>
<li>In my conf files I only put rpc username/password</li>
<li>On VM1 I do <code>./barcoin -testnet -connect=192.168.122.158 &amp;</code></li>
<li>On VM2 I do <code>./barcoin -testnet -connect=192.168.122.121 &amp;</code></li>
</ul>

<p>In .barcoin/testnet3/debug.log I get the following:</p>

<pre><code>ThreadSocketHandler started connect() failed after select(): Connection refused
trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused
Flushed 0 addresses to peers.dat 42ms
trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused}
trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused
</code></pre>

<p>I added this port 55884 to conf file of one of the machines and getting the same error.</p>

<p>Then I added command <code>connect=192.168.122.121:55884</code> to one of the conf files and started getting this:</p>

<pre><code>trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121:55884 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121:55884 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121:55884 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121:55884 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121:55884 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121:55884 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused
</code></pre>

<p>Please help me with this one.
Thank you very much!</p>

CC BY-SA 3.0
2014-05-20T21:56:08.050Z
So your question is "what is port forwarding", right? Did you try punching "port forwarding" into your favorite search engine or going to `portforward.com`?
David Schwartz
<network><testnet><altcoin>
How to establish connection for mining testnet blocks on newly created altcoin
Nur
# How to establish connection for mining testnet blocks on newly created altcoin

(Asked by: username_0 on 2014-02-11)

I was trying to clone an altcoin for educational purposes. I am total newby and I've got some plans to implement different PoW and continue working on cryto-currencies.

I followed the [cloning guide by Shakezula](http://devtome.com/doku.php?id=scrypt_altcoin_cloning_guide&rev=1391981820).

I followed all steps in the guide, however I am losing the main point: thus I am unable to connect machines to start mining. Can anyone please explain what I am doing incorrectly? I am struggling with this and am really looking forward to understand.

What I do not understand is the point on port forwarding from Shakezula's guide:

> Side note: because I use a VPS for this, I don't really need to worry
> about port forwarding at that end. On the home PC, you will want to
> forward the port you chose for P2Pport in the cut and paste section to
> the PC you're using. For this example, that is port 55884.

What does it mean? Does it mean that I should add this port in .conf file of the machines?

My case:

* I am trying to connect compiled coins on two VM machines: VM1 with IP `192.168.122.121` & VM2 with IP `192.168.122.158` (they are able to ping each other)
* In my conf files I only put rpc username/password
* On VM1 I do `./barcoin -testnet -connect=192.168.122.158 &`
* On VM2 I do `./barcoin -testnet -connect=192.168.122.121 &`

In .barcoin/testnet3/debug.log I get the following:

```
ThreadSocketHandler started connect() failed after select(): Connection refused
trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused
Flushed 0 addresses to peers.dat 42ms
trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused}
trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused

```

I added this port 55884 to conf file of one of the machines and getting the same error.

Then I added command `connect=192.168.122.121:55884` to one of the conf files and started getting this:

```
trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121:55884 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121:55884 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121:55884 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121:55884 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121:55884 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121:55884 lastseen=0.0hrs connect() failed after select(): Connection refused
trying connection 192.168.122.121 lastseen=0.0hrs connect() failed after select(): Connection refused

```

Please help me with this one.
Thank you very much!

**Tags:** network, testnet, altcoin

> **Comments:**
> **username_1**: So your question is "what is port forwarding", right? Did you try punching "port forwarding" into your favorite search engine or going to `portforward.com`?  

---

## 1 answers

### Answer by username_0 on 2014-02-15. Score: 3 | Accepted answer

I am glad to say I found a solution. It is quite trivial:
  
 The main PC, the main node, should be listening for others, therefore you need to add a command:

```
listen=1 

```

In addition, I would suggest you to add following commands as well, but for all nodes:

```
testnet=1
testnet_config=1

```

Good luck everyone.


---

