edgevpn icon indicating copy to clipboard operation
edgevpn copied to clipboard

Support for *BSD?

Open anoduck opened this issue 3 years ago • 8 comments

Just curious if there is any support for OpenBSD, or any other bsd for that matter?

anoduck avatar Oct 07 '22 09:10 anoduck

Good point!

I didn't checked if the underlaying tun libs supports it, if it does should be working. I'll have a look at that, thanks for bring this up!

mudler avatar Oct 07 '22 11:10 mudler

@mudler I know for sure there is some support for tunnels, after all OpenBSD is famous for it's routing and firewall, but as for the specific library in question, I do not know. I can look it up on my system if you know offhand the names of the library files in question.

If it is any help whatsoever: The FAQ Networking page

and a good source for discovering what extra libraries are available is Open Ports

anoduck avatar Oct 07 '22 20:10 anoduck

Seems someone patched the underlying lib used for tun/tap for FreeBSD: https://github.com/derrick658/water/commit/7dd4a78ba9451ac28603cdff8ed682d0ba69f311, so this sounds definitely doable.

mudler avatar Oct 10 '22 06:10 mudler

Seems someone patched the underlying lib used for tun/tap for openBSD: derrick658/water@7dd4a78, so this sounds definitely doable.

Sweetness!

anoduck avatar Oct 10 '22 07:10 anoduck

I'll give it a shot in the weekend, at least we can get something to build against and try out :)

mudler avatar Oct 10 '22 07:10 mudler

@anoduck ok, this builds: https://github.com/mudler/edgevpn/commit/7adff5289db79213b6a2c96a1a29f47083f75015 however the netlink part which sets up the interface is not available for FreeBSD so I have tossed some commands which probably are wrong - but as I'm not a FreeBSD expert I'd appreciate some help if you can play with that part!

mudler avatar Oct 10 '22 22:10 mudler

@mudler Will do. Awesome, I am so excited! Happy dance time!

anoduck avatar Oct 11 '22 08:10 anoduck

@mudler And, so it begins...

Got these two errors during build:

pkg/vpn/interface.go:27:56: unknown field 'Persist' in struct literal of type water.PlatformSpecificParams
pkg/vpn/interface.go:29:9: config.Name undefined (type water.Config has no field or method Name)

~~Of course, the use of persist leads to the failure of water.config. I attempted to swap out interface.go with interface_darwin.go, but then both createInterface and prepareInterface became undefined.~~

~~I am going to have to look more deeply into water's process of creating a new interface OpenBSD's means of network interface configuration is more eccentric than FreeBSD's. If I remember correctly, FreeBSD's interface configuration is almost Linux-ish. It has been a while since I installed a fresh FreeBSD system, and after programming for a few hours, my mental faculties are spent.~~

Looking on the bright side, at least we are not working on HURD's network stack. It was completely foreign from my experience.

anoduck avatar Oct 12 '22 09:10 anoduck

apologize to get back at you late! I'll try to play with it in the weekend and see. I'm not a *BSD user, so will take a bit from my side, I'll check if at least we can get away from compiler errors

mudler avatar Nov 01 '22 11:11 mudler

@mudler No worries, from everything I can gather you are a polite and very busy individual. There is no rush, things are crazy in my corner of the pond as well.

anoduck avatar Nov 02 '22 06:11 anoduck