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

Custom client nameservers #223

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

soar
Copy link

@soar soar commented Jul 12, 2022

to: @subspacecommunity/subspace-maintainers

Background

If SUBSPACE_DISABLE_DNS is set to true, but a client uses nameservers in his local subnet (e.g. his IP address is 10.0.0.2, netmask /24, home gateway and caching DNS server - 10.0.0.1), he won't be able to reach it. It can be solved partially by adding all private subnets to an exclusion list:

SUBSPACE_ALLOWED_IPS="::/0, 1.0.0.0/8, 2.0.0.0/8, 3.0.0.0/8, 4.0.0.0/6, 8.0.0.0/7, 11.0.0.0/8, 12.0.0.0/6, 16.0.0.0/4, 32.0.0.0/3, 64.0.0.0/2, 128.0.0.0/3, 160.0.0.0/5, 168.0.0.0/6, 172.0.0.0/12, 172.32.0.0/11, 172.64.0.0/10, 172.128.0.0/9, 173.0.0.0/8, 174.0.0.0/7, 176.0.0.0/4, 192.0.0.0/9, 192.128.0.0/11, 192.160.0.0/13, 192.169.0.0/16, 192.170.0.0/15, 192.172.0.0/14, 192.176.0.0/12, 192.192.0.0/10, 193.0.0.0/8, 194.0.0.0/7, 196.0.0.0/6, 200.0.0.0/5, 208.0.0.0/4"

but in some cases that local DNS server still will be unavailable (e.g. if kill-switch mode is enabled).

Changes

Now, if variable SUBSPACE_CLIENT_NAMESERVERS is set and contain a valid comma-separated list of DNS servers, this list will be included in a client config as is.

Example:

--env SUBSPACE_CLIENT_NAMESERVERS="8.8.8.8,1.1.1.1"

soar added 2 commits July 12, 2022 14:32
to define a custom list of nameservers to be included in configs
@sonarcloud
Copy link

sonarcloud bot commented Jul 12, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link

@metalcated metalcated left a comment

Choose a reason for hiding this comment

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

Looks good to me and finally someone did this! Nice work.

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