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

[BUG] Hardcoded default POT_DNS_IP causes error when changing POT_NETWORK #264

Open
zilti opened this issue Apr 26, 2023 · 3 comments
Open
Labels

Comments

@zilti
Copy link
Contributor

zilti commented Apr 26, 2023

Describe the bug
There seems to be a hardcoded default POT_DNS_IP which is 10.192.0.2. This breaks when the custom network range does not cover it.

To Reproduce
Steps to reproduce the behavior:

  1. Set POT_NETWORK to 172.16.0.0/12 and POT_NETMASK to 255.240.0.0
  2. Run pot init
  3. See error [ERROR] DNS IP (10.192.0.2) outside the network range (172.16.0.0/12)

Expected behavior
There is no default value for POT_DNS_IP and thus nothing breaks.

System configuration - if possible

  • /usr/local/etc/pot/pot.conf
POT_ZFS_ROOT=zroot/pot
POT_FS_ROOT=/opt/pot
POT_CACHE=/var/cache/pot
POT_TMP=/tmp
POT_MKTEMP_SUFFIX=.XXXXXXXX
POT_HOSTNAME_MAX_LENGTH=64
POT_NETWORK=172.16.0.0/12
POT_NETMASK=255.240.0.0
POT_GATEWAY=172.16.0.1

POT_EXTIF=vtnet0
POT_EXTRA_EXTIF=vtnet1
POT_NETWORK_vtnet1=10.0.0.0/8
#POT_DNS_NAME=
#POT_DNS_IP=
#POT_VPN_EXTIF=
#POT_VPN_NETWORKS=
@zilti zilti added the bug label Apr 26, 2023
@grembo
Copy link
Collaborator

grembo commented Jun 27, 2023

@zilti This error messages comes from bsdpot/potnet:

# potnet config-check
16:59:50 [ERROR] DNS IP (10.192.0.2) outside the network range (172.16.0.0/12)

The actual configuration is in /usr/local/etc/pot/pot.default.conf

The default is reflected in the commented out line in pot.conf:

https://github.com/bsdpot/pot/blob/master/etc/pot/pot.conf.sample#L52

And can be changed there to fit the network:

[root@jailhost-b /usr/local/share/pot]# echo POT_DNS_IP=172.16.0.100 >>/usr/local/etc/pot/pot.conf
[root@jailhost-b /usr/local/share/pot]# potnet config-check
[root@jailhost-b /usr/local/share/pot]# 

So I think everything behaves like expected, doesn't it?

@zilti
Copy link
Contributor Author

zilti commented Jun 30, 2023

My expectation would be that there'd be no default for that variable at all, because if I understand the docs correctly, that approach (using a DNS pot) is deprecated anyway.

@grembo
Copy link
Collaborator

grembo commented Dec 10, 2023

@zilti As you can see above, I opened a pull request to potnet that should make DNS IP optional without breaking backwards compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants