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

Provide bindinterface in config #146

Closed
stevenleadbeater opened this issue Dec 17, 2020 · 8 comments
Closed

Provide bindinterface in config #146

stevenleadbeater opened this issue Dec 17, 2020 · 8 comments

Comments

@stevenleadbeater
Copy link
Contributor

When using with 4G / LTE radios the IP addresses change quite a lot, it would be a lot more convenient for consumers to specify the binding in this format:

[wwan0]
bindinterface = "wwan0"
remotehost = "my.vpn.net"
remoteport = 6000

I've had a cursory glance around and there are some options. Mostly described here: https://stackoverflow.com/questions/2283494/get-ip-address-of-an-interface-on-linux the accepted answer looks as though it will be portable across linux / bsd and mac.

@stevenleadbeater stevenleadbeater changed the title Allow bindinterface in config Provide bindinterface in config Dec 17, 2020
@zehome
Copy link
Owner

zehome commented Dec 17, 2020

yes, that was discussed in the past. There is a problem with this approch, mlvpn would need to react to interface changes, not just handling the startup case. This is much much harder and is different across platforms. What you can do to workaround this is to use a router on the 4G side to avoid having to deal with it

@stevenleadbeater
Copy link
Contributor Author

How complex would that need to be? I'm not sure I'd expect a VPN to respond to an interface being yanked and recover from it. I'm probably missing something here but right now, if I renamed an interface out from under MLVPN it would trash the scoket anyway right?

@zehome
Copy link
Owner

zehome commented Dec 23, 2020

yes, probably, but I think it would be mandatory if you have a changing ip address. I don't see the point to support a changing IP address, but not handling the change at runtime

@stevenleadbeater
Copy link
Contributor Author

you are right there, however that is a problem now and a somewhat worse one. If an IP address changes while the tunnel is running, the config is no longer valid and has to be regenerated. If we have bindinterface, the subflow would just need to be restarted. This could probably be handled using dhclient-script and the existing hot config reloading facility in this project. I'd be quite interested to give this a go and see how it functioned. How do you feel about the additional configuration load here? It does mean more disparate features being strung together.

@markfoodyburton
Copy link

FWIW before I forked away, I had a script that generated my config, not just for the IP address but also for the bandwidth, as that fluctuates a lot in my case, so I was re-loading the config relatively frequently.... It's not so hard to script all this. I'm guilty of providing a load of patches (#69) that include this issue, but... I kind of agree with @zehome updating the config isn't that hard in the end.

@stevenleadbeater
Copy link
Contributor Author

bandwidth? I thought that was only necessary to configure in glorytun not ml vpn?

@stevenleadbeater
Copy link
Contributor Author

I have this all scripted for me anyway, just seemed like a useful feature, I'm happy if it's not wanted as part of the project but I suspect it is not as troublesome as suspected and does simplify scripting around it

@stevenleadbeater
Copy link
Contributor Author

duplicate of #69

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

3 participants