Bitcoin Forum
December 12, 2024, 07:56:05 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Mining behind a firewall?  (Read 1741 times)
kingcoin (OP)
Sr. Member
****
Offline Offline

Activity: 262
Merit: 250


View Profile
March 16, 2013, 03:17:30 AM
 #1

Is it possible to tunnel/forward traffic to port 8332 (under Linux) using ssh or similar If you're behind a firewall which is blocking 8332 and would like to run a miner?
Revalin
Hero Member
*****
Offline Offline

Activity: 728
Merit: 500


165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g


View Profile
March 16, 2013, 04:00:19 AM
 #2

ssh -l 8332:some.server.com:8332 user@shell.server.com

      War is God's way of teaching Americans geography.  --Ambrose Bierce
Bitcoin is the Devil's way of teaching geeks economics.  --Revalin 165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g
kingcoin (OP)
Sr. Member
****
Offline Offline

Activity: 262
Merit: 250


View Profile
March 16, 2013, 12:07:54 PM
 #3

Thanks, but I already tried that with little success. I had the following in my ssh config file:

Code:
Host test
  Hostname shell.server.com
  User user
  LocalForward 8332 some.server.com:8332

When I log in to user@shell.server.com I can do:

Code:
curl --user myrpcuser --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getwork", "params": [] }' -H 'content-type: text/plain;' http://some.server.com:8332/

but if I run

Code:
ssh test or ssh -L 8332:some.server.com:8332 user@shell.server.com

then in a different shell:

Code:
curl --user myrpcuser --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getwork", "params": [] }' -H 'content-type: text/plain;' http://localhost:8332/

I get

Code:
curl: (7) couldn't connect to host

Is there some bitcoin proxy or similar I could run on shell.server.com so I could specify port 80 which the proxy would forward to some.server.com. I guess I might be able to do it with iptables...
BookLover
Hero Member
*****
Offline Offline

Activity: 533
Merit: 500


^Bitcoin Library of Congress.


View Profile
March 17, 2013, 12:44:10 AM
 #4

Not sure if this helps, but you can set bitcoin to use a port other than the default one.

kingcoin (OP)
Sr. Member
****
Offline Offline

Activity: 262
Merit: 250


View Profile
March 17, 2013, 02:45:49 PM
 #5

Yes. But then I need some kind of proxy to forward to a different port like I asked above.


miner@80 ---> firewall ---> proxy maps 80 to 8332 ---> mining pool@8332
Schleicher
Hero Member
*****
Offline Offline

Activity: 675
Merit: 514



View Profile
March 17, 2013, 05:09:42 PM
 #6

https://bitcointalk.org/index.php?topic=146908.0

kingcoin (OP)
Sr. Member
****
Offline Offline

Activity: 262
Merit: 250


View Profile
March 17, 2013, 05:19:33 PM
 #7

Thanks! I wasn't aware of pools using port 80 and 443
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!