Skip to content

Allow rpcallowip field to be configurable#28

Merged
tropicar merged 4 commits intodappnode:masterfrom
Leibniz137:master
May 9, 2022
Merged

Allow rpcallowip field to be configurable#28
tropicar merged 4 commits intodappnode:masterfrom
Leibniz137:master

Conversation

@Leibniz137
Copy link
Contributor

@Leibniz137 Leibniz137 commented Apr 28, 2022

- 0.23 was recently released

  • i have found it useful to allow connections from my local LAN when my dappnode-wifi or vpn isn't working reliably. The env var was already set up for use in the entrypoint script, it just needed to be exposed in the UI

Copy link
Member

@alexpeterson91 alexpeterson91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the version bump it will be done in another PR with proper versioning.
And create an issue for the exposable RPC part.

@alexpeterson91 alexpeterson91 self-requested a review April 29, 2022 01:22
Copy link
Member

@alexpeterson91 alexpeterson91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert your version bump commit(s)

And for your RPC issue you need to create an issue here first github.com/dappnode/DAppNodePackage-bitcoin/issues with more context, you allowing RPC from the internal docker network will definitely not fix your issue, you need the container port 8332 to be forwarded (TCP) to a host port. then from the local network network navigate/point to the LAN address of the dappnode followed by :8332 if you set the ports the same will allow you RPC access to bitcoin otherwise use whatever host port docker forwards the bitcoin container port 8332 to.

- BTC_TXINDEX=1
- BTC_PRUNE=0
- BTC_DISABLEWALLET=1
- BTC_RPCALLOWIP=172.33.0.0/16
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gonna need more context about why you want this implemented since AFAIK this will not work for your desires. Please create an issue with details and link it to this PR. However I don't think this will help, and regardless will need to be undone during a coming refactor with internal IP addresses and we are moving off of the subnet you added since its a public IP block. Please make an issue https://github.com/dappnode/DAppNodePackage-bitcoin/issues and explain in more detail your issue because just allowing the ip range wont help since you need to have an exposed port to the host. not to the internal docker network.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I also expose the port in the network settings via the dappnode gui (on the package's port settings page)

I am doing this because I need a connection to the bitcoin rpc port that is reliable for multiple days. I have always had trouble having uninterrupted connections to both the dappnode vpn as well as the dappnode wifi. (In the first case, my vpn connection will occasionally fail, and in the second case, the wifi stops being connected to the internet)

So instead of being on the vpn or dappnode wifi, I just stay on my normal wifi (which uses the normal 192.168.0.0/24 subnet) and assign my dappnode a private static ip address via my home router.

Here's my config sparrow config:
image

(the proxy config is irrelevant here)

I think that if you are going to set this to something other than 0.0.0.0/0 then you should allow the user to override the configuration. In that case you just need to add the environment variable to the docker-compose file

Copy link
Member

@alexpeterson91 alexpeterson91 May 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one still breaks compatibility with other packages like LN I think need confirm from @tropicar also if you're on the same LAN this is unnecessary. Just forward the RPC port to the host from the docker container. You can then point it at the forwarded RPC port on the dappnode using the DAppNodes LAN address. You don't need to use a VPN or the dappnode Wi-Fi to connect like that if the port is properly exposed to the host. No need for proxies and changing the code of the package. I know I said this before but don't think I was particularly clear about VPNs and Wi-Fi not being needed. Just reserve an IP on your LAN and set it to your dappnode so it keeps the same local IP much simpler.

@dapplion
Copy link
Contributor

dapplion commented May 4, 2022

CC @tropicar

@tropicar
Copy link
Collaborator

tropicar commented May 5, 2022

As @alexpeterson91 said, if we want to implement this feature, you should create an issue explaining why we would have to add these options to the package. We need that information in order to decide if it is a good idea to do it in a package by default that everybody will use. Thank you for the feedback!

@Leibniz137
Copy link
Contributor Author

reverted the various version changes so it's just the single feature.

I will open an issue and reference it here. I think it's pretty reasonable change, to keep whatever you want for that value as the default, but just allow the user to change it if they want to in the config section of the package.

@Leibniz137 Leibniz137 changed the title Upgrade to v0.23, allow rpcallowip field to be configurable ~~Upgrade to v0.23,~~ allow rpcallowip field to be configurable May 5, 2022
@Leibniz137 Leibniz137 changed the title ~~Upgrade to v0.23,~~ allow rpcallowip field to be configurable Allow rpcallowip field to be configurable May 5, 2022
@tropicar tropicar linked an issue May 6, 2022 that may be closed by this pull request
@tropicar tropicar merged commit d16a96e into dappnode:master May 9, 2022
@alexpeterson91
Copy link
Member

Just gotta remember to change this when we change this too when we do the docker subnet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow user to override default rpcallowip bitcoin.conf setting

4 participants

Comments