Bitcoin Forum
November 13, 2024, 05:08:26 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: At home node with external systems needing info from it ?  (Read 2012 times)
MoreBloodWine (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1001


View Profile
February 16, 2015, 08:37:46 AM
 #1

I was hoping to get help from someone who's done work for me in the past but not sure if I will be able to for one reason or another. That being said, I am curious about something.

If I have a node set up at home on a Windows laptop that's running fine. How would I go about having an external system, a cloud VPS with all my websites hosted in CA I think, connect to the home system to gather info via RPC ?

Right now I have two cloud VPS's (hosted in CA I think), one with all my websites etc on it and the other a currently set up running node.

Well... the hosted server with the node is out of disk space which wasn't very large to begin with, and to add more GB is $10 a month for 10Gb/s. Well, while that's fine if all I ever needed was another 10Gb, it got me to thinking. Eventually it will get to the point where I need to keep buying disk space for the VPS hosting the node. So I started thinking, why dont I just use the home system with another node on it to get the info from that I display on my websites.

So ya, here's my current thought process.

I would like to have my outside the home server with websites connect to my at home Windows laptop with bitcoind / QT to get the info it currently gets from the outside the home hosted node.

Right now the server with the websites has AFAIK, all the files with RPC connection info for the hosted node server. So it should be a matter of just changing IP Address A (hosted outside the home node) to IP Address B (home hosted node).

I'm just not sure how to really do this with a laptop connected to a home network with many other system on it belonging to other family members with the only real IP being the one belonging to the cable modem. Assuming it's not as simple as just changing the IP address in the RPC files to that of the one belonging to my cable modem. But hell, when is anything ever that damn simple lol.

So ya, if I have made sense and I hope I did I look forward to reading your replies.

To be decided...
Newar
Legendary
*
Offline Offline

Activity: 1358
Merit: 1001


https://gliph.me/hUF


View Profile
February 16, 2015, 08:47:38 AM
 #2


Is the laptop on a fixed IP? I would think setting/opening (router, firewall etc.) the port and set the appropriate IPs in the settings file should work.

Alternatively there's a patch to prune to a desired size: https://bitcointalk.org/index.php?topic=582817.msg9767429#msg9767429  I gather we can expect it in 0.11.x.

OTC rating | GPG keyid 1DC91318EE785FDE | Gliph: lightning bicycle tree music | Mycelium, a swift & secure Bitcoin client for Android | LocalBitcoins
MoreBloodWine (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1001


View Profile
February 16, 2015, 09:04:23 AM
Last edit: February 16, 2015, 09:59:22 AM by MoreBloodWine
 #3


Is the laptop on a fixed IP? I would think setting/opening (router, firewall etc.) the port and set the appropriate IPs in the settings file should work.

Alternatively there's a patch to prune to a desired size: https://bitcointalk.org/index.php?topic=582817.msg9767429#msg9767429  I gather we can expect it in 0.11.x.
It's I believe on a fix IP from the router it's on that's connected to my cable modem Yes it is on a fixed IP via my router which gets its internet connection from the cable modem, but AFAIK, that's like an inside the home IP. So like if I gave you the IP of the laptop set via the router and not the "real" IP of the cable modem, you couldn't get close to the system. Or am I understanding all this wrong with how IP's work lol.

As for the prune thing, I didn't read too much in to that but what's it do, just prune old shit from say the time the chain was launched ? Just seems like pruning stuff might eventually break things.

Also, I assume when you say settings file you mean the bitcoin.conf file or w/e it is right ?

Edit: FWIW, this is the router I have... Neatgear WNDR4500 w/ Firmware Version V1.0.1.20_1.0.40

Edit 2: Correct me if I'm wrong but I've been thinking about this more. While yes the Laptop is on a fixed IP via the router. By assigng port xxxx to the laptop from within the router, if I'm able to do so (assign port xxxx to IP xxx.xxx.x.x "the laptop"). Wouldn't using my cable modems IP and the port I just set direct incoming requests from outside the home servers to the laptop which is just running the BTC node and some other small things.

That being said, would I need to do anything special to the laptop itself ? Or would incomming connections just search the laptop til it finds the bitcoind backend ?

Edit 3: Looking at the Port Forwarding / Port Triggering of my router now. It's asking for a service type, here's what's available.

1. TCP/UDP
2. TCP
3. UDP

Which one of these would I use ?

To be decided...
Newar
Legendary
*
Offline Offline

Activity: 1358
Merit: 1001


https://gliph.me/hUF


View Profile
February 16, 2015, 10:31:14 AM
 #4

Re pruning: I probably should have linked directly to this: https://github.com/bitcoin/bitcoin/pull/4701


I should have mentioned that I actually never have done this particular scenario Smiley  Anyway, some pointers:


Re IP: Your laptop will have an IP on your internal network. That is its private IP. Probably starts with 192.etc. If you want to connect to it from outside your internal network, I recommend you fix the laptops' private network IP in the router. (Look for a setting called "DHCP static IP" or similar). Your external (public) IP may change from time to time (depends on your Internet provider). Unless your Internet provider gives you a static IP. Ask them. If it's dynamic you will need a service like NoIP.com (there are others), to make your dynamic IP available at the same connection point at all times. You can find your external IP by browsing to websites like whatismyip.com .

Now, for communication from outside your network to a certain port, you will need to open that in your router config. Also, any firewalls you may have installed on the laptop need to open that port. You may remember it from how you did it when you opened port 8333 for your node? For RPC standard is 8332, but you can (and probably should) change it to another port. Makes it a bit harder for people trying to get "in", if they happen to learn your IPs.


Re config file: Yes, I meant the bitcoin.conf file. There are more options for security like password, ssl certs, restrict to certain IP (the one of your VPS) etc. Have a look here: https://en.bitcoin.it/wiki/Running_bitcoind#Command-line_arguments  All these commands (except -conf) can be included in the conf file.


Re TCP/UDP (from the above wiki article):
Quote
# Listen for RPC connections on this TCP port:
 #rpcport=8332


From my experience things like that may need a bit of tinkering, so you might want to try this with a dummy system first.

OTC rating | GPG keyid 1DC91318EE785FDE | Gliph: lightning bicycle tree music | Mycelium, a swift & secure Bitcoin client for Android | LocalBitcoins
MoreBloodWine (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1001


View Profile
February 16, 2015, 10:45:41 AM
 #5

Re pruning: I probably should have linked directly to this: https://github.com/bitcoin/bitcoin/pull/4701


I should have mentioned that I actually never have done this particular scenario Smiley  Anyway, some pointers:


Re IP: Your laptop will have an IP on your internal network. That is its private IP. Probably starts with 192.etc. If you want to connect to it from outside your internal network, I recommend you fix the laptops' private network IP in the router. (Look for a setting called "DHCP static IP" or similar). Your external (public) IP may change from time to time (depends on your Internet provider). Unless your Internet provider gives you a static IP. Ask them. If it's dynamic you will need a service like NoIP.com (there are others), to make your dynamic IP available at the same connection point at all times. You can find your external IP by browsing to websites like whatismyip.com .

Now, for communication from outside your network to a certain port, you will need to open that in your router config. Also, any firewalls you may have installed on the laptop need to open that port. You may remember it from how you did it when you opened port 8333 for your node? For RPC standard is 8332, but you can (and probably should) change it to another port. Makes it a bit harder for people trying to get "in", if they happen to learn your IPs.


Re config file: Yes, I meant the bitcoin.conf file. There are more options for security like password, ssl certs, restrict to certain IP (the one of your VPS) etc. Have a look here: https://en.bitcoin.it/wiki/Running_bitcoind#Command-line_arguments  All these commands (except -conf) can be included in the conf file.


Re TCP/UDP (from the above wiki article):
Quote
# Listen for RPC connections on this TCP port:
 #rpcport=8332


From my experience things like that may need a bit of tinkering, so you might want to try this with a dummy system first.
I'll give everything a once over and get back to this post if needed. That doesn't mean I'm not interested in other peoples opinions though. @Newar, please subscribe to this if you don't mind or if your prefer I can PM you like I did earlier asking you to check this since I wasn't sure if you subscribe ti every post you reply to like I do lol

Ty for help provided thus far though ;-)

To be decided...
cr1776
Legendary
*
Offline Offline

Activity: 4214
Merit: 1313


View Profile
February 16, 2015, 03:26:06 PM
 #6

You might consider running over a VPN too depending on the use case.
MoreBloodWine (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1001


View Profile
February 17, 2015, 11:20:49 AM
Last edit: February 17, 2015, 02:25:56 PM by MoreBloodWine
 #7

Ok... so here's the deal and where I am stuck with my at home node, but first, this is what the bitcoin.conf file looks like for the at home node.

Quote
rpcport=xxxx
rpcuser=xxxx
rpcpassword=xxxx
rpcallowip=xxxx

I even went in to the windows firewall and opened port xxxx with the scope of allowing outside computers so my outside the home hosted VPS which has all my websites can, should be able to, connect to the at home node for processing various data gathering among some other things.

I even went in to my router and did a port forward pointing port xxxx to the internal private IP of the laptop which is static.

Before anyone asks, yes I am using the right public IP from my ISP which is static as well inside of the config files which reside on my outside the home VPS that my sites use to otherwise gather data like the following.

Current Difficulty: 44,455,415,962
Next Difficulty (Est.): 45,578,945,535
Increase by: 1,123,529,573 (+2.53%)
(Next change in 863 blocks.)

So ya, can anyone maybe try to please help me figure out just WTH I'm doing wrong ?

FWIW, the at home node is on a Windows Vista system.

Ty in advance.

Edit: I should add the at home node is connected to the internet just fine as I can process stuff from it, it just seems though that I cannot connect to the node from the outside world via rpc (my websites to gather and display info liek diff etc). Heck, I even set in my routers port forwarding a range of ports... just not sure on the check box as I don't understand what it means.


To be decided...
Newar
Legendary
*
Offline Offline

Activity: 1358
Merit: 1001


https://gliph.me/hUF


View Profile
February 17, 2015, 04:17:09 PM
 #8

From the screen shot it seems you tried non-default ports. Why don't you try 8332 for starters?

Quote
rpcallowip=xxxx

That is the IP of your VPS, right?




Can you see your node on bitnodes? For example if you put your external IP in the search box here: https://getaddr.bitnodes.io/nodes/?q=


Check if the appropriate ports are open: http://www.yougetsignal.com/tools/open-ports/

OTC rating | GPG keyid 1DC91318EE785FDE | Gliph: lightning bicycle tree music | Mycelium, a swift & secure Bitcoin client for Android | LocalBitcoins
MoreBloodWine (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1001


View Profile
February 17, 2015, 10:56:32 PM
Last edit: February 17, 2015, 11:08:11 PM by MoreBloodWine
 #9

From the screen shot it seems you tried non-default ports. Why don't you try 8332 for starters?
It was suggested I try non standard, but I even tried 8332 and still no luck and with the wide range open / forwarded to the laptop via the router. It would suggest the "error" is on the Windows Laptop.

Quote
rpcallowip=xxxx

That is the IP of your VPS, right?
Yes, the IP of of my externally hosted VPS with all my websites on it that "need" to gather data from the node.

Can you see your node on bitnodes? For example if you put your external IP in the search box here: https://getaddr.bitnodes.io/nodes/?q=

Says unreachable but I don't put much faith in that as I search for my current external home node that's running out of disk and it said not found on 8332 which is what my sites get the current RPC data from, but did find 8333 open.

As with the home note, it says un reachable on 8332 & 8333.

Check if the appropriate ports are open: http://www.yougetsignal.com/tools/open-ports/

Reason 2, I have little to no faith in the previous link is because the yougetsignal found 8332 & 8333 open on my externally hosted node that I will need to close down because it's running out of disk hence the move to home with the node.

As for my home static IP...

1: Port 8332 is closed on xx.xxx.xx.xx
2: Port 8333 is open on xx.xxx.xx.xx
3: Port <custom> is closed on xx.xxx.xx.xx

4: Now it's saying custom is open lol, so f'all if I know what to do.

5: Saying customs closed again lol.

So as far as the "closed" ports go, hell if I know what went wrong as they should be open via the windows firewall. Doubt it's a router thing because all tested ports are within the wide range forwarded on the router which is a Neatgear WNDR4500.

To be decided...
MoreBloodWine (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1001


View Profile
February 18, 2015, 05:18:27 AM
 #10

Ok, so my host confirmed ports 8332, 8333 and custom open on my VPS with my websites that need to connect to the home node for processing of data etc.

That being said, the home windows system was a dual boot so not sure if anything would have interfered with that. So on that note, since the laptops not used for much, I'm just gonna wipe it out. Re-install Vista and load just the core QT client and let it DL the chain and go from there. Wont even install any extras like I did which was MalwareBytes Anti Malware and a few other small things. Gonna make this a brand new deal, install QT, DL the chain and go from there to see what happens so I guess this post will effectively be on hold for a day or two to see what happens going this route.

AFAIK, the VPS with my websites is G2G meaning it's was just something with the laptop holding me up since again, AFAIK. I did everything right with my ISP by getting a static IP and then forwarding ports 8k - 9k to the laptops internal IP which was 192.x.x.x.

So fingers crossed !

Will take pointers with this being an otherwise "new" system install with nothing but stock windows stuff and QT installed.

So ya, here's the setup as it should be when in working order.

Server A, which is outside the home some 1k miles away from me which has my websites on it it should connect to a home node on Windows Vista via RPC to gather info like diff etc. and post it back to server A.

This is how my existing set up is with my outside the home node which sends and receives data just fine to the server with my websites on it. But as I said, since my existing outside the home node is running out of disk space. I am wanting to move the node to home which will in the long run help me save some cash by closing out the server currently hosting my existing node outside the home.

Now with all that out of the way I bid farewell to this post til Windows Vista is installed with QT running the fully downloaded blockchain.

To be decided...
nuno12345
Sr. Member
****
Offline Offline

Activity: 276
Merit: 284


View Profile
February 18, 2015, 10:05:17 PM
 #11

Hello

1-As others pointed set rpcallow=your_vps_ip and rpcport=desired_port, reboot bitcoin.
2-If you have a dynamic IP (you can use it if you have a static one too) use any service like no-ip.com(free) and set it up properly so it redirects your IP to a domain (it may take some time to propagate trough the internet).
3-Go into the router admin panel and open the desired_port (note that you may need to forward the connections into the LAN IP of your rpc server(ipconfig)).
4-Reboot router.
5-Use any service like canyouseeme.org to check if the port is actually open (opening router port's can be tricky sometimes).
6-From this point you can connect from you VPS to your local RPC server, across the internet.

Hope this helps Smiley
2112
Legendary
*
Offline Offline

Activity: 2128
Merit: 1073



View Profile
February 18, 2015, 11:55:06 PM
 #12

What a stupid advice! This is just a hackers dream: hosted web server that has address, username and password to the machine holding the hot wallet!

I'm just going to record for the future reference the two advice givers before they delete their posts.

FYI: this needs to be done backwards: the home machine polls the hosted web server's database for any transactions that may require attention/servicing by the Bitcoin client. The web+database server should never have that information stored anywhere. And the home machine should never allow any incoming connections. In fact the home machine probably should explicitly beep and ask the user at home to approve any transaction above certain safety threshold.
Hello

1-As others pointed set rpcallow=your_vps_ip and rpcport=desired_port, reboot bitcoin.
2-If you have a dynamic IP (you can use it if you have a static one too) use any service like no-ip.com(free) and set it up properly so it redirects your IP to a domain (it may take some time to propagate trough the internet).
3-Go into the router admin panel and open the desired_port (note that you may need to forward the connections into the LAN IP of your rpc server(ipconfig)).
4-Reboot router.
5-Use any service like canyouseeme.org to check if the port is actually open (opening router port's can be tricky sometimes).
6-From this point you can connect from you VPS to your local RPC server, across the internet.

Hope this helps Smiley
From the screen shot it seems you tried non-default ports. Why don't you try 8332 for starters?

Quote
rpcallowip=xxxx

That is the IP of your VPS, right?




Can you see your node on bitnodes? For example if you put your external IP in the search box here: https://getaddr.bitnodes.io/nodes/?q=


Check if the appropriate ports are open: http://www.yougetsignal.com/tools/open-ports/

Please comment, critique, criticize or ridicule BIP 2112: https://bitcointalk.org/index.php?topic=54382.0
Long-term mining prognosis: https://bitcointalk.org/index.php?topic=91101.0
Newar
Legendary
*
Offline Offline

Activity: 1358
Merit: 1001


https://gliph.me/hUF


View Profile
February 19, 2015, 12:16:46 AM
 #13

What a stupid advice! [...]

Thanks for chiming in. Not what OP asked for, but maybe he will consider it.

OTC rating | GPG keyid 1DC91318EE785FDE | Gliph: lightning bicycle tree music | Mycelium, a swift & secure Bitcoin client for Android | LocalBitcoins
MoreBloodWine (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1001


View Profile
February 19, 2015, 01:33:29 AM
 #14

My specific set up will post no threats to me or any of my machines. I have a few contactts I can talk to that have posted useful info here that I will continue with via PM if needed, that being said I am locking this thread.

To be decided...
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!