I'm fairly new to bitcoin and mining and am currently using a very restrictive ISP(port forwarding is not permitted). Therefore, it is not possible to connect to the bitcoin network(port 8333 is blocked). I also have a work station, in a different network, which doesn't share the above limitation. I am using ubuntu 12.04 and went for the OpenVPN package. I can connect to the remote machine but don't know how to route mining traffic through it. Also, I don't want to delegate mining tasks to the remote box as it is a low end machine. Is mining through a VPN tunnel possible in this context?

  • Are you sure that a port forwarding is needed for mining? As far as I know, you just need to be able to send traffic out on that port. (if your ISP blocks everything but port 80 for traffic or some such, that would be a problem)
    – Earlz
    Commented Jan 31, 2014 at 5:42
  • You need that port when peers broadcast transaction information; and sadly yes the ISP blocks all inbound connections
    – Sebi
    Commented Jan 31, 2014 at 9:03
  • There is no way, at least not with a pool. I have a restrictive firewall (no UPnP or ports forwarded) and I have no problems connecting to the bitcoin network. Do you mean the ISP blocks all outbound connections on non-standard ports or some such?
    – Earlz
    Commented Jan 31, 2014 at 14:48
  • Yes, nobody can connect to my machine. I am currently trying to set up OpenVPN on the remote machine.
    – Sebi
    Commented Jan 31, 2014 at 14:59
  • I'm also having what appears to be an issue with running bitcoind behind OpenVPN. bitcoind appears to crash after a few minutes with nothing in ~/.bitcoin/debug.log. Couple questions: 1. How can I tell the cause for the daemon terminating if there's nothing in the log file? 2. Do I need to make a change to my IP tables, or some other aspect of my VPN configuration? Not exactly sure conceptually what is required to get bitcoin network traffic in/out through the VPN. Thanks guys! Commented Nov 13, 2016 at 17:04

2 Answers 2


Yup. Most of the common VPN services would work with it, it's a normal TCP/UDP sort of system. I use torguard VPN, but I think most would work.


I've managed to route all traffic that runs through eth0 to tun0. The tun0 interface is created by default once the VPN service starts(given that the bridging option(tan) was commented out on both the client and the server config files). Running "netstat -nr" gives the routing table. Then, all duplicate routes need to be deleted. For example if there are more than one Destination(s) pointing to the same Gateway one needs to be dropped in order for the other to work properly. Otherwise packets are sent through both gateways. In my case I had to delete the route which was pointing to my NAT and leave the one which pointed to my VPN server's address(usually is assigned by default). In order to drop a certain route run the command:

sudo route del default gw <NAT internal IP, i.e.>.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.