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?
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>.