-
crest
rwp: i found an other pair of bug reports for a problem with FreeBSD dns stub resolver and there hasn't been any change in years despite a patch
-
crest
the problem is you can use a link-local address as nameserver in resolv.conf
-
crest
rtsold will correctly install the entry via resolvconf
-
crest
but the DNS stub resolver will consider it invalid syntax for an ip address and ignore the line
-
crest
the issue has even been brought up upstream on github by someone else
-
crest
it happens *sigh*
-
nulltaz
Do you guys know if there are any differences between the 'wireguard-tools' package and the 'wireguard-go' package, other than one being written in go?
-
nulltaz
oh wait, it seems I might not even need to install either... I will now go RTFM
-
rwp
crest, It feels strange to be using a link-local address for a resolver when the loopback device is always available and more well used.
-
rwp
That's probably also why that has been languishing. Using a LL address is not really needed. It has a typically used alternative that is always available.
-
drathir_tor
rwp: its kind-ish could have sense if configured per interface basis... but taking on mind some isp routers using fe:: pool for ipv6 only nat64 mode setups for router... linklocal for resolver not sounfs as crazy...
-
rwp
I guess we don't know if that link-local address is an IPv6 fe02::/16 address or an IPv4 169.254.0.0/16 address. But either way it feels strange. Because using DNS to me implies that one is connected to the larger network.
-
rwp
But I could see someone arguing the point that a system could be set up and configured on an isolated LAN without connection to the larger network. And then, strange as that might seem, set up DNS locally.
-
rwp
I am imagining a small cluster on a dogsled radar mapping the land under the ice in Antarctica.
-
hodapp
you don't even need to imagine that far. airgapped networks exist for e.g. classified work
-
hodapp
as in, airgapped from the broader Internet
-
rwp
Oh sure. I have set up airgapped systems myself. But I always used 10.*/8 networking in that case with everything static because allowing dynamic addressing seemed counter to the security of a private LAN.
-
hodapp
the ones I'm talking about still have DNS & DHCP and so forth
-
rwp
There is no problem setting up DNS on a private LAN with say a 10.*/8 network. And DHCP too for that matter but that seems to me to be counter to the philosophy there. But there isn't anything hard about it.
-
Laidback_01
just wanted to drop by and say my recently rebuilt FreeBSD 15.0 desktop is a nice running machine! using a Gnome 47 desktop. Still on Xorg. Seems to be quite good at this moment.
-
crest
nulltaz: the wireguard-go port is a wireguard userspace implementation in go
-
crest
it uses a tun device as network interface
-
crest
that makes it portable, but slow
-
crest
wireguard-tools is the wg cli tool
-
crest
the wg command has been imported into freebsd base
-
crest
and freebsd has its own in kernel implementation
-
Laidback_01
is wireguard possible to get running in a Jail? I've been successful with bhyve VMs, and regular proxmox VMs, etc. but yea... so far no go on a jail fo rme.
-
nimaje
what part do you want in the jail? you can create a vnet jail and give it the wg interface for networking (I guess that is what you want to do)
-
Laidback_01
oh, right. if you do it with vnet, yeah, it works. I just didn't want to use vnet - stability issues in the past, and usually need 2 nics to prevent network 'blinking' on the host.
-
crest
Laidback_01: yes if you use vnet jails
-
crest
you could also have the host manage the wireguard interface and put alias addresses on it, but thats probably not what you're asking for
-
hodapp
woo, just set up vnet jails with one person's method - creating an epair, bridging one end of the epair with another interface, passing other end into jail
-
hodapp
epairs were new to me, maybe because I'd never heard of the exact thing from Linux-land
-
nimaje
seems like the equivalent in linux would be veth
-
hodapp
oh, yeah, that sounds right
-
nulltaz
Hey quick question. Since WireGuard support is included at the kernel level (wg interfaces), then what is the point of installing the wireguard-tools package?
-
nxjoseph
nulltaz: This supplies the main userspace tooling for using and configuring
-
nxjoseph
WireGuard tunnels, including the wg(8) and wg-quick(8) utilities.
-
nulltaz
But I’m pretty sure I configured the wg interface and generated the keys without that package
-
nxjoseph
and are you also connect without these?
-
nxjoseph
then you don't need them, for me i couldn't use wg without these tools
-
nxjoseph
esp. wg-quick makes it easier
-
nimaje
wg-quick makes it easier if your setup matches what wg-quick assumes you want to do
-
nxjoseph
i see, im not that experienced
-
nulltaz
I just followed the steps in the “Command-line interface” section of this page on the official WireGuard site (using ifconfig instead of ip for the first two steps)
-
nulltaz
-
nulltaz
Seems like there’s barely any config. Generate keys on the client and server, and then set preferences on the wg interface using ‘wg setconf’
-
nulltaz
If it’s that simple, there’s no need for wireguard-tools ?
-
nulltaz
I just can’t figure out what wireguard-tools is for lol
-
hodapp
wireguard's included in the kernel? was this a recent change?
-
[tj]
2022?
-
scottpedia
wireguard's in the kernel?
-
scottpedia
like by default or you have to add it?
-
hodapp
maybe I read
news.ycombinator.com/item?id=33381949 and it served only to confuse me
-
scottpedia
i honestly think wireguard is useless since there are other protocols that do better
-
scottpedia
why'd you re-invent the wheel?
-
hodapp
in my usage of it I've quite liked it
-
nimaje
nulltaz: well, wg-quick combines those three commands, lets you have the IP in the config file and if you have the VPN for all connections then DNS= in the config sets resolvconf up correctly, if you don't match that expectation then the nameserver set there will be configured as only nameserver for the system, so you would have to work with PostUp/PreDown
-
nulltaz
nimaje, ah, that makes sense. ty
-
nimaje
scottpedia: do you have examples? especially better in the performance goal of wireguard would be interesting
-
scottpedia
ipsec
-
SomeVisitor
how’s that better?
-
crest
IPsec VTI interface via if_ipsec
-
crest
SomeVisitor: ipsec can make use of hardware crypto acceleration
-
scottpedia
libreswan is built into the kernel so there is the performance increase
-
crest
e.g. AES-GCM via AESNI and PMUL instructions
-
crest
scottpedia: nope
-
scottpedia
???
-
SomeVisitor
so does wirguard, or am I wrong, crest?
-
crest
the ipsec kernel code isn't part of libreswan (at least on FreeBSD)
-
crest
the interface between the IKE daemon (strongswan, libreswan, iked, whatever) and the kernel happens via PFKEYv2 on FreeBSD
-
scottpedia
maybe I used the wrong terminology but I think it's loaded into the kernel? or what?
-
crest
SomeVisitor: no because wireguard uses a single ciphersuite that hardcoded into the protocol
-
scottpedia
enlighten me then
-
crest
for wireguard traffic encryption that's chacha20 + poly1305
-
crest
chacha20 is a fast cipher for software crypto
-
scottpedia
cause I once asked if libreswan can be statically linked and compiled
-
crest
and isn't terribly slow anywhere
-
scottpedia
they say it's possible but'd lose all performance bonus due to being out of the kernel
-
SomeVisitor
I pretty much max out my network speeds with wireguard without much cpu load
-
crest
where as AES-GCM can't that fast in pure software if you want to protect against timing sidechannels
-
crest
but on any x86 cpu released in the last ~15 years there are special instructions to make AES and GCM faster
-
crest
ipsec because of its flexibility can make use of the exact cipher combination accelerated by common hardware features
-
scottpedia
ipsec is widely used across the industry
-
crest
the crypto isn't specific to ipsec
-
scottpedia
often in peering between campus networks
-
SomeVisitor
most things are widely used before they become superseded ;)
-
crest
the aesni + pmul instructions can be used for other protocols that use the same ciphers e.g. TLS oder SSH
-
crest
but wireguard has a single cipher written into the specification so it can't take advantage of these hardware features
-
crest
if you use IPsec on FreeBSD there is a kernel datapath for it which daemons like strongswan can configure
-
crest
it works like this
-
crest
the daemon configures a policy
-
crest
the kernel matches traffic against the policy
-
SomeVisitor
it’s easy to configure without the chance to shot into foot. So it has it place, even if other software is more flexible I think
-
crest
on a match the kernel checks if it has a session key to use
-
crest
if not it buffers the packet and give the daemon a chance to establish a new session
-
scottpedia
crest: i'd be great if you can walk me through this in detail. I couldn't seem to figure it out myself for a long time now.
-
crest
the general idea is spelled out in the PFKEYv2 RFC
-
crest
IPsec has a lot of really annoying historical baggage that you can't hide from if you use it
-
crest
it was designed by a committee in 90s
-
crest
so everyone brought their own ideas an instead of selecting only the good ones they agreed to optionally put in a whole lot of duplicated crap
-
crest
also back than many operating systems had fairly primitive network stacks
-
crest
so the designers (ab-)used IPsec to force certain features into any network stack that wanted to call itself IPsec capable
-
crest
e.g. the whole IPsec transport vs tunnel (vs virtual interface) mess
-
crest
also they didn't really knew how IPsec would be used
-
crest
there was this confused notion of (opportunistic) traffic encryption
-
scottpedia
crest: any study resources to recommend?
-
SomeVisitor
»IPsec was a great disappointment to us.« (Ferguson, Schneier) [scnr]
-
crest
good question. i don't have a single handy source to give you.
-
scottpedia
how'd you know so much? crest
-
crest
some of it is in old mailing list archives, other spread over a dozen books etc.
-
crest
scottpedia: i had to make ipsec work when the only alternative was openvpn
-
scottpedia
okay?
-
crest
and by make work i mean between different implementations
-
scottpedia
that sounds like how you deal with AWS VPC
-
scottpedia
which I worked with in peering
-
scottpedia
kind of hard to deal with
-
crest
that's easy because you have a single well known peer configuration 1000s of people used before you
-
scottpedia
okay
-
crest
also the still actively used stuff is just a small subset of the crap that used to exist in the wild
-
scottpedia
wat you think of libreswan?
-
crest
if i have to use ipsec on freebsd i normally use strongswan
-
scottpedia
what's the main difference
-
crest
and before that i used racoon *shudder*
-
crest
i can't tell you because i never had reason do give libreswan a chance
-
crest
iirc one is a fork of the other
-
scottpedia
okay alright
-
scottpedia
'd be great if I can consult you in the future regarding any ipsec-related questions crest
-
scottpedia
you seem to be extra-knowledgeable
-
crest
scottpedia: you can try, but my recommendation for new deployments would be to use WireGuard unless you know why you need IPsec
-
scottpedia
ok thx for the advice
-
scottpedia
it's duly noted
-
crest
and if you need something with easy to manage clients maybe give openvpn a chance, because they have added data channel offloading on FreeBSD 14 and recent Linux versions
-
crest
which does what the name implies: offload the traffic into the kernel for supported configurations
-
scottpedia
okay. i always used openvpn to connect to VPS's subnet for raw console access
-
crest
it does not change the traffic so the peer doesn't know the difference
-
scottpedia
it seems to be more widely adopted by the industry lately
-
crest
iirc OpenVPN DCO only supports uncompressed Layer 3 client-server mode
-
scottpedia
okay
-
crest
but for stuff like IPMI access WireGuard is more than fast enough
-
scottpedia
okay
-
scottpedia
it feels like a new player so i had to be cautious
-
scottpedia
a product of the 2020s
-
crest
it's fairly new, but it took advantage of decades of other peoples mistakes
-
crest
to learn what a vpn needs to be and only add what is easy to add
-
scottpedia
okay that sounds reassuring
-
scottpedia
anyways gotta go. it's great talking to you.
-
crest
e.g. a formally verified handshake protocol instead of hacking some custom crypto
-
crest
the slightly slower crypto is also one that is fast enough on every imaginable CPU
-
crest
so it doesn't depend on special hardware to get good performance
-
crest
at the cost of not getting the very best performance if you have special hardware available
-
crest
the real uservisible difference is how many fewer settings there are
-
crest
a wireguard configuration is normally ~10 lines
-
crest
while ipsec configuration can easily grow to 100 lines
-
crest
plus dealing with a X.509 PKI to solve problems >98% of the users won't have
-
crest
with users defined as the poor bloke that has to make it work
-
nimaje
as we are on the topic of vpns, I try to configure openvpn to start a jail with the tun device it creates and manage it via scripts (that part works), but on the server side (which I don't control) are multiple servers that push me stuff like IP, gateway and DNS configuration, my problem is that on reconnects sometimes openvpn decides that it has to destroy the tun device for some reason (my guess
-
nimaje
is the pushed IP Address changed), I already set persist-tun ifconfig-noexec and route-noexec, but they don't seem to help, any ideas how to fix that?
-
nimaje
hm, maybe I can use another script around openvpn with --mktun and --rmtun to workaround, but I still have no idea why openvpn thinks it has to recreate the tun device
-
nwe
ls
-
ant-x
. ..
-
Intellis
ls ..
-
satanist
. ..
-
CrtxReavr
I have a somewhat dated rhat8 box. . . and I need unison installed it, for which there does seem to be a package.
-
CrtxReavr
So I downloaded the latest tarball, un-tar'd it and ran make.
-
CrtxReavr
First it bitched because there was no ocaml installed. . . so I installed the ocaml.x86_64 v4.07.0-3.el8 package and re-ran make:
bpa.st/P7TQ
-
CrtxReavr
Any ideas on how to proceed?
-
rdr
FreeBSD 15... typing "pkg" can't find a suitable version to install the pkg program on the system...?
-
zerotime
good day #freebsd
-
zerotime
!inspire
-
zerotime
The mind that turns ever outward Will have no end to craving. Only the mind turned inward Will find a still-point of peace. -Ming-Dao Deng [
zenquotes.io]
-
zerotime
is there a supported method to create 13.x compatible zpools in freebsd 14.x and 15.x?
-
mason
zerotime: Yes. Look at the -o compatibility= options.
-
mason
zerotime: In particular look in /usr/share/zfs/compatibility.d/
-
mason
I use, for instance, openzfs-2.2 as it covers all my systems here, FreeBSD and Linux. I'll nudge it up when possible.
-
polarian
so whats the requirements for a poudriere build jail
-
polarian
which is created by poudriere
-
polarian
say if I make installworld to create a jail from src, how does this differ from poudriere?
-
polarian
i assume /usr/ports is a requirement within the poudriere jail too