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

suggestion for a new script trigger ; before "preresolve"? #569

Open
flucas1 opened this issue Jun 28, 2024 · 0 comments
Open

suggestion for a new script trigger ; before "preresolve"? #569

flucas1 opened this issue Jun 28, 2024 · 0 comments

Comments

@flucas1
Copy link

flucas1 commented Jun 28, 2024

The current "up" script takes place quite late in the process.

In my setup I have a fairly complex set of tunnels, that I need to define and bride in advance.
Currently I do it with sytemd-netowkrd, but I cannot allow openvpn to create the tunnels dinamically as many other services in the machine are dependent on the tunel device.

In this context all the routing is handled without openvpn "äutomations", as there is quite a bit of network traffic mangling and balancing.

Under unexpected circumstances the tunel can fail connection leading to situations where the "up" script was executed but not the "down".

In this sense I have experienced situations where I need to do manual cleanups on the networking. To automate this, the only way is to have openvpn do not retry connections, exit the process, and a ExecStartPre in systemd...

But it would be much simpler having a script extension called within the openvpn process, before on each connection attempt.
I have not checked the code in detail, but probably it should take place in "init.c" init_instance(..) function and before the preresolve part.

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

1 participant