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

Post processing of routes and DNS #960

Closed
pschichtel opened this issue Dec 6, 2021 · 8 comments
Closed

Post processing of routes and DNS #960

pschichtel opened this issue Dec 6, 2021 · 8 comments

Comments

@pschichtel
Copy link

What I'm requesting is basically https://github.com/adrienverge/openfortivpn/wiki#using-pppd-ip-up--ip-down-scripts, buth without the need for --no-dns and --no-routes.

The VPN I need to connect to has a log of routes and search domains, however there is exist a few problems with that configuration that can't easily be solved on the VPN server side. So instead I want to "post process" the routes and search domains I receive from the VPN. Add additional routes, remove routes, add additional search domains, remove search domains.

Currently I'd need to duplicate all routes and search domains before being able to add my own.

@DimitriPapadopoulos
Copy link
Collaborator

That would typically be solved by outsourcing routing/DNS setting to an external script, typically the vpnc-script used by OpenConnect.

@pschichtel
Copy link
Author

I don't think I follow

@DimitriPapadopoulos
Copy link
Collaborator

DimitriPapadopoulos commented Dec 6, 2021

Perhaps I'm not following either. You need custom routing/DNS settings. This would be easy to achieve with an external script, called by openfortivpn, typically with a --script option, and setting routing/DNS instead of openfortivpn. As documented in #678, I believe this is the best solution to implement this request and other similar requests, such as #371, of which I believe this issue is a duplicate.

Have you tried following these instructions without --no-dns and --no-routes?
https://github.com/adrienverge/openfortivpn/wiki#using-pppd-ip-up--ip-down-scripts

@pschichtel
Copy link
Author

My point is: I explicitly don't want --no-dns and --no-routes. Want to take what the VPN server provides me, but just customize it a little.

The problem with the pppd script is that they are executed before openfortivpn sets the routes and domains, so the script can't change anything about the values.

@DimitriPapadopoulos
Copy link
Collaborator

Then I believe the best solution would be to implement the above functionality, where openfortivpn calls an external script to set routing and DNS.

@pschichtel
Copy link
Author

Yes I think that would be the most straight forward solution. Similar to wireguard'a PostUp option or the existing pppd scripts (just executed later).

@DimitriPapadopoulos
Copy link
Collaborator

Do we agree this is a duplicate of #678? If so, can I close this issue?

@pschichtel
Copy link
Author

I guess whatever useful solution comes out of #678 would be able to cover this.

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

No branches or pull requests

2 participants