I am running two altcoin clients on different network, connected by VPN. The addnode command works fine, and nodes connects. But what to do if I want others to connect to my network? The ip addresses i have are local subnet addresses.
You should have at least one node that can be accessed from a public IP address. This might mean setting up your router/firewall to forward your altcoin's port to the internal IP address of the machine.
You might hardcode this (public) IP into your altcoin code if it's static (it sounds like this is a very small, probably made by you, altcoin), and/or hardcode DNS server(s) that point to known node(s) (maybe use No-IP if you're looking for a free/cheap approach with a dynamic IP). These are the same techniques that Bitcoin Core uses to discover your first peers.
Once a new client has connected to its first peer, the peer will tell you about more peers, etc.
Not really getting it. My computer connects fine on bitcoin and litecoin network. I checked mye external IP on getmyexternalip.com. Then I apply the command addnode xx.xx.xx.xx add -on my own client at the other machine (which is on my workplace). Should not that work?– SveinMay 24, 2014 at 19:39
You probably have a firewall blocking the port. See wikihow.com/Set-Up-Port-Forwarding-on-a-Router– Tim S.May 24, 2014 at 20:46
I fixed it by adding the line listen=1 in the .conf file at for one client I also used the -connect=xx.xx.xx.xx command line argument where I used the global ip that I found on myexternalip.com