Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple IP range migration #246

Merged
merged 14 commits into from
Jan 12, 2024
Merged

Conversation

dappnodedev
Copy link
Contributor

@dappnodedev dappnodedev commented Dec 27, 2023

Due to the code complexity, the changes made to adapt the VPN package to the new private IP range are minimum.

The new private IP range will be 10.20.0.0/24

Note that this changes will make the package stop working in the previous public IP range

@dappnodedev dappnodedev requested a review from a team as a code owner December 27, 2023 11:35
Copy link

github-actions bot commented Dec 27, 2023

DAppNode bot has built and pinned the release to an IPFS node, for commit: 778a9a9

This is a development version and should only be installed for testing purposes, install link

/ipfs/QmcYYpr7SBiP2ahn42V1daoMoTbE1fpne2ZYzj4RrKTaCe

(by dappnodebot/build-action)

Copy link
Contributor

@pablomendezroyo pablomendezroyo left a comment

Choose a reason for hiding this comment

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

LFG!

@dappnodedev
Copy link
Contributor Author

We need to handle this before merging:

The best approach would be to detect the current IP range and set the flags accordingly before calling ovpn_genconfig

Copy link
Member

@3alpha 3alpha left a comment

Choose a reason for hiding this comment

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

OpenVPN supports pushing multiple routes to client config. I think it we should just push both routes and both dhcp servers, similar as we have in Wireguard. That will reduce complexity and failure points. It may require bit lager changes of script generating config, but I would say it is worth it.

@pablomendezroyo
Copy link
Contributor

This PR also removes isAdmin middleware!

@pablomendezroyo
Copy link
Contributor

Also added minimumDappnodeVersion: 0.2.85

@pablomendezroyo
Copy link
Contributor

pablomendezroyo commented Jan 11, 2024

OpenVPN supports pushing multiple routes to client config. I think it we should just push both routes and both dhcp servers, similar as we have in Wireguard. That will reduce complexity and failure points. It may require bit lager changes of script generating config, but I would say it is worth it.

The changes should be done to reflect in the config file /etc/openvpn/openvpn.conf
from

### Push Configurations Below
push "dhcp-option DNS 172.33.1.2"
push "comp-lzo no"
push "route 172.33.0.0 255.255.0.0"

to

### Push Configurations Below
push "dhcp-option DNS 172.33.1.2"
push "dhcp-option DNS 10.20.0.2"
push "comp-lzo no"
push "route 172.33.0.0 255.255.0.0"
push "route 10.20.0.0 255.255.255.0"

@pablomendezroyo
Copy link
Contributor

LFG!

@dappnodedev dappnodedev merged commit 4465106 into master Jan 12, 2024
2 of 3 checks passed
@dappnodedev dappnodedev deleted the dappnodedev/simple-ip-range-migration branch January 12, 2024 15:40
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.

3 participants