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

Debian 8 install and IPv6 issue leads to DNS fail #23

Open
cerih opened this issue Jan 13, 2017 · 1 comment
Open

Debian 8 install and IPv6 issue leads to DNS fail #23

cerih opened this issue Jan 13, 2017 · 1 comment

Comments

@cerih
Copy link
Contributor

cerih commented Jan 13, 2017

Not really an issue specific to this repository, but I have not personally experienced this other than when installing Debian using Packer with qemu and its use of this particular type of network device.

I will write up the changes after an opportunity for other perspectives.

Whether you experience this will depend on your own qemu user networking support for ipv6.

Debian 8 network installation can acquire a site-local address from qemu, and if so, it then installs rdnssd which overwrites /etc/resolv.conf with a useless IPv6 DNS address (by default fec0::3)
In /var/log/installer/syslog you will find..
Jan 13 13:09:47 apt-install: Queueing package rdnssd for later installation
This will overwrite /etc/resolv.conf on reboot and cause failure of shell update/package scripts.
Solutions:

  1. Override user network definition in json to force ipv4 only (see added -netdev option). rdnssd does not get installed as result.
"qemuargs": [
    [ "-netdev", "user,hostfwd=tcp::{{ .SSHHostPort }}-:22,id=user.0,ipv4"],
    [ "-device", "virtio-net,netdev=user.0"]
 ]
  1. Install resolvconf package which is recommended when rdnssd is installed normally (but not when inserted by the installer in this case) which will allow many programs to "manage" /etc/resolv.conf. In preseed.cfg edit pkgsel to add it.
    d-i pkgsel/include string openssh-server resolvconf

  2. Disable/remove rdnssd if it was installed when resolvconf was not, e.g. in preseed.cfg

d-i preseed/late_command string \
  if [ -x "/target/sbin/rdnssd" -a ! -x "/target/sbin/resolvconf" ] ; then \
    in-target systemctl disable rdnssd.service ; \
  fi

See also this Debian bug

@jakobadam
Copy link
Owner

I'm not using the debian. So I guess you're in a better position to pick a solution.

conorsch added a commit to freedomofpress/packer-qemu-templates that referenced this issue Feb 14, 2017
As described in jakobadam#23, there are several options available to force an
ipv4 connection for the guest. Otherwise, the built box comes up with an
unroutable ipv6 address that can't get out.

So far, none of these options have resolved the issue.
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

No branches or pull requests

2 participants