Skip to content

Move routing and name resolution changes into an external script? #678

Description

@DimitriPapadopoulos

I'm wondering whether moving the code that changes routing and name resolution parameters to an external script would help write and maintain openfortivpn. Typically most of ipv4.h/ipv4.c would move to that script. Additionally an option should be provided to run an alternative script.

Cons:

  • Spawning an external script instead of handling that internally in the C code is bad - or so I thought.
  • Providing an option to run an external script to be run with administrative rights is a security hole. This risk needs to be discussed and mitigated. See for example Wrapper for ip on the OpenVPN community site.

Pros:

  • A script language is probably more suited to changing routing and name resolution parameters in a portable way.
  • Relevant code would probably shrink at 10% of the initial C code and would be easier to maintain.
  • Would help implement and maintain alternative methods of handling the name resolution subsystems (NetworkManager, systemd-resolved, resolvconf) as envisioned in Improve DNS handling? #600.
  • Linux packagers have a chance to easily adapt the name resolution stuff to their specific distribution.
  • We already have a PR that suggests we add systemd-resolved support as en external script: Add support for systemd-resolved #615.
  • It could actually help run openfortivpn without sudo privileges (or at least drop such privileges after spawning pppd). See Revisit running openfortivpn as root? #650.
  • IPv6 support would be easier.
  • OpenVPN have ended up doing the same, see OpenVPN - ArchWiki.

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions