Coder Social home page Coder Social logo

Comments (7)

WGH- avatar WGH- commented on July 28, 2024

However, if systemd-networkd is restarted for any reason, it'll lose all the info. The solution with temporary .network files doesn't have this problem.

from openvpn-update-resolv-conf.

piotr-dobrogost avatar piotr-dobrogost commented on July 28, 2024

I don't know systemd very well but I don't see how restarting one service (networkd) would make another service (resolved) loose any info.

from openvpn-update-resolv-conf.

poettering avatar poettering commented on July 28, 2024

The best option would be to push the DNS data directly into resolved, as mentioned.

Restarting networkd has no effect on resolved keeping the DNS data you pushed into it around or not. However, currently resolved will forget data you push into it if you restart resolved itself. That's certainly something we should fix though... I added that to my todo list now.

It would be fantastic if openvpn would push its discovered DNS data directly into resolved via the API we provide, and we have prepped documentation explaining how to do this:

https://wiki.freedesktop.org/www/Software/systemd/writing-network-configuration-managers/

Note that the interfaces have been added very recently only, hence you need 229 or newer to make this work.

from openvpn-update-resolv-conf.

WGH- avatar WGH- commented on July 28, 2024

Also, it seems that implemented solution is broken on newer systemd. Restarting systemd-networkd removes the IP from the VPN interface for some reason, leaving it without one.

from openvpn-update-resolv-conf.

WGH- avatar WGH- commented on July 28, 2024

https://github.com/jonathanio/update-systemd-resolved
This script seems to do the job. I don't really feel like rewriting what already works fine :)

from openvpn-update-resolv-conf.

piotr-dobrogost avatar piotr-dobrogost commented on July 28, 2024

Thanks for your engagement in this and the link!
Maybe update-systemd-network.sh script should be dropped then and information about https://github.com/jonathanio/update-systemd-resolved added to readme instead?

from openvpn-update-resolv-conf.

WGH- avatar WGH- commented on July 28, 2024

The script might remain useful for distributions stuck with older systemd versions, like Debian Jessie or Gentoo stable, though. So I'm against the complete removal.

But users running newer systemd should be redirected to the better script, I think.

from openvpn-update-resolv-conf.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.