<p>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 <strong>"netstat -nr"</strong> 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 10.8.0.1 is assigned by default). In order to drop a certain route run the command:</p>

<pre><code>sudo route del default gw &lt;NAT internal IP, i.e. 192.168.2.1&gt;.
</code></pre>

CC BY-SA 3.0
2014-02-05T00:14:43.280Z
2014-02-05T00:14:43.280Z
Sebi
<p>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.</p>

CC BY-SA 3.0
2014-01-30T20:49:36.837Z
2014-01-30T20:49:36.837Z
Daniel Ness
<p>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?</p>

CC BY-SA 3.0
2014-01-31T05:42:26.140Z
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
CC BY-SA 3.0
2014-01-31T09:03:14.673Z
You need that port when peers broadcast transaction information; and sadly yes the ISP blocks all inbound connections
Sebi
CC BY-SA 3.0
2014-01-31T14:48:39.747Z
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
CC BY-SA 3.0
2014-01-31T14:59:03.510Z
Yes, nobody can connect to my machine. I am currently trying to set up OpenVPN on the remote machine.
Sebi
CC BY-SA 3.0
2016-11-13T17:04:31.737Z
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!
mecampbellsoup
<bitcoind><miner-configuration><ubuntu><server>
Bitcoin Mining Through VPN
Sebi
# Bitcoin Mining Through VPN

(Asked by: username_0 on 2014-01-30)

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?

**Tags:** bitcoind, miner-configuration, ubuntu, server

> **Comments:**
> **username_1**: 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)  
> **username_0**: You need that port when peers broadcast transaction information; and sadly yes the ISP blocks all inbound connections  
> **username_1**: 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?  
> **username_0**: Yes, nobody can connect to my machine. I am currently trying to set up OpenVPN on the remote machine.  
> **username_2**: 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!  

---

## 2 answers

### Answer by username_0 on 2014-02-05. Score: 0 | Accepted answer

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 10.8.0.1 is assigned by default). In order to drop a certain route run the command:

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

```


---

### Answer by username_3 on 2014-01-30. Score: 0

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.


---

