[size=24pt]UPDATE Oct 14 2014: This method is not functional for use under the current version of peerunity (v0.1.1) and peercoin(v0.4). [/size]
[size=14pt]see http://www.peercointalk.org/index.php?topic=3477.msg33767#msg33767 I’m keeping the information here for reference in case someone makes use of it for further deveolpment. I will soon be creating a peer4commit project aimed at the integration of peercoin with hidden services networks like TOR and I2P. Stay tuned for the link to the project and the proposal.[/size]
[size=24pt]WARNING: Do not use until community has had time to discuss the solution viability. Follow the thread for updates.[/size]
–[size=36pt]DRAFT[/size]: Still editing. Just needed to post it so i can work on it more later. I fail at editing lol –
From SunnyKing interview: http://www.peercointalk.org/index.php?topic=2934.0
Ben: Do you have any guidance on what the community can do to ensure network security? Is it as simple as "start minting"?
Sunny King: Right that’s sort of comparable to 51% attack in bitcoin
Sunny King: I know many users are hesitant to do this because of risk of getting hacked. That’s why the cold minting feature is an important consideration
Sunny King: Before that feature is implemented, you can do two things to help mitigate the risk
Sunny King: One is to use the ‘minting only’ unlock mode for minting with an encrypted wallet
Sunny King: The other is to proxy your minting node behind tor
Ben: For the second mitigation strategy, we, the community, can help educate people about setting up Tor and enabling the proxy settings on their wallet client
Minting behind TOR was suggested by SunnyKing beack in June 2014 as a way to mint semi-securely while waiting for the cold-minting development. However, minting and securing the network isn’t the only thing needed to ensure the survival of the network. Full Nodes that accept incoming connections are VITAL for the health of the network’s infrastructure.
In here, we are attempting to create a full node (acceptes incoming connections) in a way that doesn’t disclose the IP address and limits access to only the ports required for the peercoin network communication.
I’ve been thinking about this for quite a while but never had the time to play around with it. Today I managed to finish setting it up and testing it. It’s working!
Why is this significant ?
To run a full node means that the device will be accepting incoming connections and with that it needs to disclose its external IP address. Malicious people out there could get their hands on your ip address and attempt multiple attacks on your device hoping to hit the jackpot by getting through a security vulnerability or open ports that the user wasn’t aware was open. That’s the reason people who mint on their wallets (meaning they keep the majority of their funds on that wallet that’s online) tend not to run a full node. Since minting requires an unlocked wallet, if an attacker manages to find a breach in your connection by knowing your IP address, he gets access to your funds. There are multiple projects attempting to solve this problem like the cold-minting (protocol side protection), peerbox ( OS security ) and maybe others that i’m not aware of. This method attempts to provide a safe way to run a full node without disclosing the user’s IP and only explicitly open the ports that the peercoin network needs. In essence it achieves a software version of the same protection princibles that the Peerbox project is providing.
How do we achieve this?
We use the TOR network and the Hidden Services feature it provides. To read more on that https://www.torproject.org/docs/hidden-services
- Can run Full Node without fear of exposing IP address
- Miniting on Full Node is achievable securely without need for hardware isolation like peerbox nor do we have to wait for cold-minting to finish development. You can start minting on full node today!
- Does not create disjoint networks. The client will still be able to connect to nodes not running a tor hidden service (Note: if the peercoin client is updated to provide tor hidden service by default this issue would be obsolete)
- As everyone feels secure about minting on full nodes, the number of full nodes will explode and we’ll have a more robust infrastructure for the network.
- TOR is a already well established system that’s robust and can be trusted. We do not need to reinvent the wheel.
- Can be used to support the TOR network by running tor as a relay as well
- Higher bandwidth usage for users as all information passing in the TOR network requires encapsulation and security overhead
- Slower transfer rates (Note: this is only significant during initial sync with network. After that, transactions aren’t large enough to notice the a significant change in speed)
- requires using TOR, a third party application. ( However, since TOR is open source, it can be included in the client or instructions of how the client can set it up could be made available)
– Work In Progress–
[size=18pt]How to run a full node behind TOR[/size]
[size=12pt]STEP 1: TOR download, installation, configuration instructions[/size]
[ul][li]Download the Vidalia Relay Bundle here : https://www.torproject.org/download/download.html.en [/li]
[li]Follow the installation and run vidalia to run TOR. https://www.torproject.org/docs/tor-doc-windows.html.en [/li]
[li]Follow the instructions here to create a hidden service https://www.torproject.org/docs/tor-hidden-service.html.en and change ports to match the following [/li][/ul]
HiddenServicePort 9901 127.0.0.1:9901
HiddenServicePort 9903 127.0.0.1:9903
Choose whichever Dir you like but keep note of it. It will hold both your hostname and the private key associate with that hostname
[ul][li] Restart Vidalia and TOR[/li]
[li] Navigate to the HiddenServiceDir that you specified in the torrc. It will have 2 files now. Take note of the contents of the hostname file. This is the address for your hidden service that will allow others to connect to you. We will need it when configuring peercoin client[/li][/ul]
[size=12pt]STEP 2: Peercoin/Peerunity configuration[/size]
[ul][li]Exit the client[/li]
[li]Delete the current peerlist by deleting addr.dat (Win 8.1 at: C:\Users<user name>\AppData\Roaming\PPCoin\addr.dat ) [/li]
[li]Add the following lines to the peercoin.conf file[/li][/ul]
[code]############# TOR CONFIGUARATIONS ############
############# END TOR CONFIGUARATIONS ############[/code]
Put your TOR hidden service hostname that we got earlier at the externalip field
[size=12pt]STEP 3 : Router and firewall configuration[/size]
[ul][li]Remove ports 9901 and 9903 from any firewall authorization you have given before[/li]
[li]Remove ports 9901 and 9903 from port forwarding rules on your router if you had it configured before or used UPNP to auto configured it[/li][/ul]
I hope this concept appeals to the peercoin community. There is great value that could increase the number of full nodes exponentially which is much needed for the peercoin network. I see great potential in implementing this concept into the client for ease of setup for all users and this way every user out there will be running a full node regardless of their network configuration and whether they can achieve port forwarding or not.