-
darwin
does FreeBSD UNIX 14.2 .ISO also work on USB flash drive (at least on its own, but maybe also in a boot manager like MultiBootUSB or YUMI) or must be on DVD?
-
mpeterma
darwin, not sure if this fits the background of your question (you likely are already aware of that) but there is a separarte image file for memory sticks which can be used to flash a bootable installation USB stick
-
darwin
i have that, but it's incomplete/smaller so I'd rather use a hybrid .ISO, which should work for USB flash drive (but not always in a boot manager)
-
ketas
if you required packages present then it's indeed incomplete
-
ketas
i did bring up the maxi memstick idea somewhere
-
darwin
there wouldn't need to be an entire other .IMG as long as the .ISO is hybrid (works for both CD & USB flash drive)
-
ketas
does it work?
-
ketas
any reason you're not trying it?
-
ketas
download restrictions or so
-
darwin
already have all the FreeBSDs I want installed but just want to update boot USB flash drive
-
darwin
updated 3/4 the installations within those and will do the last one within it
-
darwin
unless I have emergency (unlikely but why I'll update the USB flash drive)
-
ketas
you updated from installer eh?
-
ketas
i guess it works
-
ketas
if you have more sticks you could just have more installers eh
-
mfisher
mzar: great idea - done
-
mzar
mfisher: what was the idea ?
-
mfisher
that I could donate to the FreeBSD Foundation instead of just saying thanks for 14.2-RELEASE on IRC
-
mzar
sure, you can do both
-
mfisher
done and done
-
mzar
cool
-
shiroyasha
Say I want to initialize jails on first "boot". Like, cloning a ZFS snapshot with a barebones FreeBSD fs (just the extracted base.txz and little more), updating `/etc/jail.conf` on host, putting some file (script or archive) somewhere within the jail, and then when I run `service jail start $JAIL` I want it to install packages, update /etc/rc.conf, update some config files, etc.
-
shiroyasha
Any recommendations on the least painful way to achieve that?
-
shiroyasha
The goal is to have an initial setup as vanilla as possible, and from there leave the setup to some automation. I'm guessing Ansible would be the way to go? I was reading about `configinit`, but there doesn't seem to be any port so that's probably very specific to AWS EC2.
-
shiroyasha
But I want to do this on my own PC (i.e. not EC2).
-
shiroyasha
The problem I'm trying to solve: When I upgrade the host from (for example) 14.1 to 14.2, I want to be able to recreate the jails from scratch (like you would a Docker container). I know I can just (1) keep running the old version, or (2) do `freebsd-update -j $JAILNAME fetch install`, but I'm trying to learn a bit more around this topic.
-
mzar
shiroyasha: maybe you wan thin jails instead of thick ones
-
rtprio
you could use ansible, yes
-
rtprio
but it's not a trivial problem to solve
-
rtprio
because things like /etc/ssh/ssh_host_*.key's and things
-
remiliascarlet
Happy new year!
-
isley
woo hooo!
-
» shiroyasha takes notes.
-
rtprio
like, 96% of the time, just copying in a new 'world' and new 'kernel' would be sufficient, i would expect
-
scoobybejesus
if anyone is running the matrix server, conduit, in a jail, in particular behind caddy, did you have to do anything special? i'm not getting a web interface on normal 443, and it seems port 8448 has connection refused. logging the packets in the host in pf, they arrive, so they should be redirected to the caddy jail, and caddy should be handling those packets properly. caddy logs show mgs: NOP over and over. i'm stuck
-
bebop
scoobybejesus: netstat -an | grep 8448 to see if it is actually listening on the correct port inside the jail.
-
scoobybejesus
i'm logging packets to port 8448 in pf, and they're hitting the rdr rule sending it to caddy. i can curl from the host and it returns Hello from Conduit!. But doing curl from home whether to 443 or 8448 returns either nothing or failed to connect (for 8448). Adding -v doesn't add much except that it's reaching caddy. I've been pulling my hair out
-
bebop
and you've ran that from within your jaili?
-
bebop
jail
-
scoobybejesus
i did sockstat -4 in the jail. the jail is listening on 6167 like it says it should be. caddy is supposed to reverse proxy to that jail IP:6167
-
bebop
is conduit in a seperate jail?
-
scoobybejesus
nothing is actually "listening" on 8448. though in the caddy config, i have my matrix url:8448 as on of the hosts
-
scoobybejesus
yeah, caddy in one jail, and conduit in another
-
bebop
you can't use localhost/127.0.0.1 in the caddyfile is what I'm reading.
-
bebop
caddy inside the jail sees localhost as itself. is that possible the issue?
-
scoobybejesus
i'm using the jail's address in the caddyfile. i'm sort of matching what is working for the other 10 jails. the config looks fine. i don't get it
-
bebop
you must use the jails IP address of the conduit jail
-
bebop
ok
-
bebop
tried tcdump within caddy jail?
-
Remilia
scoobybejesus: I have a similar set-up but with haproxy and dendrite
-
scoobybejesus
it's not a vnet jail. i wonder if i can allow it with a devfs rule. but no, not yet. "tcpdump: vtnet0: Packet capture is not supported on that device"
-
Remilia
you need to have caddy actively listening on 8448 and forward that port from your NAT'd iface to it
-
scoobybejesus
and dendrite cooperates just fine? that one is pretty lightweight, right?
-
Remilia
yes I have no issues
-
Remilia
lemme double check my set-up
-
scoobybejesus
paste.debian.net/plain/1341961 is my caddy config. that sits inside a wildcard block
-
Remilia
scoobybejesus: yeah, dendrite is listening on 8008 in my case, and haproxy has a front-end on 8448 that does TLS termination and throws everything at matrix
-
bebop
sounds like caddy is trying to forward traffic to a port where there is no service running
-
scoobybejesus
well, i certainly am getting absolutely nothing in the conduit logs, even when i bumped it up to TRACE
-
Remilia
scoobybejesus: do you have 8448 listed in caddy global https ports?
-
bebop
what does: jls say?
-
scoobybejesus
-
Remilia
scoobybejesus: conduit can only listen on one port, that is fine
-
bebop
conduit isn't listening
-
Remilia
it is
-
scoobybejesus
i do not have 8448 listed in global https ports. hm. looking into that
-
Remilia
scoobybejesus: sockstat -4l in your caddy
-
Remilia
does *caddy* listen on 8448?
-
bebop
shows it's not listening on 8448
-
Remilia
bebop: it should not
-
scoobybejesus
looks like caddy is not listening on 8448, despite the config telling it to.. hmm
-
Remilia
one port is enough for a matrix homeserver, the load balancer/proxy should handle TLS
-
bebop
shows it's listening on 6167
-
scoobybejesus
in the matrix jail, conduit is listening on 6167. in the caddy jail, i am reverse proxying to the matrix jail port 6167
-
Remilia
scoobybejesus: your conduit is perfectly fine, you need to set up caddy to listen for TLS on 8448
-
Remilia
and reverse proxy for matrixhost:8448 to caddy's 6167
-
bebop
what does you toml bind addr and port say?
-
scoobybejesus
in the matrix jail, toml says to bind to 10.0.0.121 and port 6167
-
bebop
should be port 8448 ?
-
Remilia
no
-
Remilia
bebop, do you run a matrix homeserver?
-
Remilia
scoobybejesus:
paste.ee/p/ZlzsQ this is an example from my set-up
-
Remilia
note that HAProxy listens on 8448 for TLS and forwards to dendrite
-
bebop
Remilia: no, I haven't
-
Remilia
scoobybejesus: aside from 8448 you already forward some of the 443 for well-known purposes, which is correct
-
scoobybejesus
8448 is the federation port. yeah, my caddyfile listens for the appropriate URL both on 443 and on 8448, though it appears it's not actually listening on 8448. looking at the docs on setting a global https_port to 8448 doesn't seem correct though. hmm.. i'm digging
-
Remilia
caddy docs do not give any hints
-
Remilia
scoobybejesus: I found this
xiu.io/posts/14-caddy-reverse-proxy-dendrite and seems like it works for them so I am very confused
-
Remilia
scoobybejesus: all I can think of is configuration issues
-
Remilia
oh
-
Remilia
scoobybejesus: yeah, look at the Caddyfile samples, you have issues in your configuration
-
Remilia
it does *not* tell Caddy to listen on anything, so it just listens on the default ports
-
Remilia
you need `chat.my.tld:443 chat.my.tld:8448 { .... }`, *that* will already match HTTP host
-
Remilia
oh and you can skip :443 for the first one
-
scoobybejesus
right.
-
scoobybejesus
hmm. I will try again
-
Remilia
-
Remilia
you only need the 2nd part if you are not doing different-domain
-
scoobybejesus
I added 443 just in case it would start working
-
Remilia
oh wait, no, you also need to move the first part's well-known probably
-
Remilia
not sure, might work without with default schema
-
scoobybejesus
when I ran conduit a couple years ago I didn't need the well known part. I have never added that in. I was thinking to add it, but that isn't in the conduit docs. weird
-
Remilia
it's needed if you use a different domain AND if you are matching on _matrix
-
Remilia
in your case, if you run nothing else on chat.my.tld, you can just handle /*
-
Remilia
I'm 99% sure that your issue is in using the host matcher there for your global wildcard host
-
scoobybejesus
the only thing I can think is that matrix requires an A record, so maybe a wildcard cert is not good enough
-
Remilia
no, it should be fine
-
scoobybejesus
maybe I should have a separate section in the caddyfile. hmm. but you don't think so. hmm
-
Remilia
look
-
Remilia
Caddyfile effectively has matchers and virtual hosts, and you do not have a virtual host defined
-
Remilia
your line, @chat host chat.my.tld:443, chat.my.tld:8448, means 'define a matcher'
-
Remilia
and 'handle ....' applies to *any hostname*, then filters by host
-
Remilia
it's like if you set up nginx as just one host, with matches on the Host header
-
Remilia
-
Remilia
scoobybejesus:
paste.ee/p/1ecw5 this is *all* you need
-
scoobybejesus
I am going to print the json version of the caddyfile config to see if the matches appears to work the same when there are two hosts listed.
-
Remilia
take a look at that paste
-
Remilia
this tells caddy to match Host to chat.my.tld, listen on default 443 and on 8448, and forward everything to conduit
-
Remilia
also maybe no , needed, not sure, I do not run caddy haha
-
scoobybejesus
that will pull a fresh cert specifically for chat.my.tld, going in its own block, rather than using the wildcard cert i already have. that's why i'm using the matchers. but i may do that anyway
-
Remilia
scoobybejesus: then with your setup you need to add *.my.tld:8448 where you have *.my.tld
-
scoobybejesus
hmm... now you're onto something...
-
Remilia
that *.my.tld section is what defines a listener
-
scoobybejesus
sockstat shows it's listening on 8448... phew... super helpful! thank you!
-
Remilia
sorry, I had no idea how it handles wildcard stuff ahaha
-
Remilia
this is too 'magical' for me, I manage certs the old way
-
scoobybejesus
now i can curl the server on port 8448 and not get the connection refused, but i'm still not getting any response. caddy logs show all these NOP (no-op) log lines
-
scoobybejesus
so annoying
-
scoobybejesus
and so much backlog was all caddy and not even freebsd. sorry for that, folks
-
scoobybejesus
maybe i will switch to dendrite...
-
Remilia
haha
-
Remilia
scoobybejesus: in `reverse_proxy /_matrix/* 10.0.0.121:6167`, remove /_matrix/* altogether
-
Remilia
you are matching on Host and want everything to go to conduit
-
scoobybejesus
i was considering trying that. now seems like a great time to try it.
-
Remilia
1) if you are cURLing 8448 without specifying /_matrix/... you will get no match, which is what NOP probably is, 2) you want webfinger to work
-
Remilia
(/.well-known/matrix/ stuff)
-
scoobybejesus
nada
-
Remilia
run tcpdump with ASCII output for the conduit port in your conduit jail, see if caddy tries to connect
-
scoobybejesus
caddy is not sending packets. i just tested the same command (running from host) using another jail's IP and going to the website hosted by the other jail, and tcpdump spewed out a bunch. with `tcpdump -i lo0 dst 10.0.2.121`, there's nothing
-
scoobybejesus
caddy log entries show "bytes_read":0 for all these chat.my.tld.log entries
-
Remilia
scoobybejesus: ok but you are contradicting yourself right now
-
Remilia
you posted your caddy config as reverse_proxy /_matrix/* 10.0.0.121:6167
-
Remilia
now you are posting `tcpdump -i lo0 dst 10.0.2.121`
-
scoobybejesus
sorry about that. mistype! tcpdump is listening on the correct address 10.0.0.121
-
Remilia
then it's something with your caddy setup
-
Remilia
scoobybejesus: btw use /_matrix/federation/v1/version in curl to check what is going on on 8448
-
scoobybejesus
curl 10.0.0.121:6167/_matrix/federation/v1/version in both the host and caddy jail returns {"server":{"name":"Conduit","version":"0.9.0"}}. from home, curl returns nothing... i need a break...
-
scoobybejesus
8448 is for federation. i would think at least 443 would cooperate though and show me a web page
-
scoobybejesus
fascinating. when i get rid of the chat.my.tld in caddy, i am able to pull up chat.my.tld/_matrix/federation/v1/version in a website. so yeah, something with caddy? it still won't return anything at chat.my.tld, but it's a clue
-
scoobybejesus
anyway, i feel bad.. this is now officially caddy and not freebsd
-
scoobybejesus
feel free to bounce ideas in -social or somewhere. i really appreciate the help so far
-
zip
I have a silly problem: my freebsd machine takes an absolute age to be available over ssh. I've recently changed its network settings so it's now in routing mode. I suspect network issues.
-
zip
it becomes pingable pretty quickly over both ipv4 and ipv6, but ssh doesn't seem to come up until I can ping the jails
-
zip
I suspect I'll find out very quickly once I can get over to it and plug in a display
-
zip
... it's definitely the jails, hrmn
-
zip
disable jails and it comes up immmmedddddiately
-
zip
Hm. I disable ipv6 in the jail and it comes up nearly as quickly as with jails off, but still with a 2-3 second extra delay. So something in the process of firing up the VNET for the jail is slowing down boot
-
zip
I suppose I could solve this, but I've also discovered that if I want to route traffic internally to the global ipv6 addresses on the jails I need to distribute routes to every damn computer on the network somehow, plus it's not DMZ'd, so I think my next play is to either stick the entire jail subnet into a VLAN or an l2tp tunnel and hand it off to my router, which can then do both of those things
-
megaTherion
zip: then its an issue in your jail config?
-
megaTherion
maybe try with a single jail and then check the settings of this
-
zip
yup, it was a single jail
-
zip
I'm wondering if it's radvd taking its time to hand over an IP
-
zip
rtadvd sorry
-
zip
still, I'm a little surprised that sshd depends on it
-
megaTherion
is your ssh also jailed?
-
megaTherion
you should be able to ssh in the OS immediadly, regardless of what the jails are doing
-
megaTherion
or its an network conflict or something like that
-
zip
perhaps it's that
-
zip
this is my first time adding routing within a home network
-
Remilia
zip: sshd is supposed to come up before jails
-
Remilia
(the host system's)
-
zip
yeah, that's what I expected as well
-
zip
yet, I get a connection refused
-
zip
I suspect I'm going to have to haul a monitor over to the machine and poke at it
-
zip
well, first I think I'm going to tunnel traffic back to the router so that the router just hands over IPs via slaac and dhcp so that the machine itself doesn't have to be doing any routing, so that I can DMZ my services
-
zip
well, I suppose I could dmz them with pf, but I figure it's easier this way
-
zip
present status: agonising about whether to backhaul over vlan, vxlan, gre, l2tp...
-
Remilia
zip: just to make sure, are you using the standard jail.conf stuff?
-
Remilia
you can do `rcorder /etc/rc.d/* /usr/local/etc/rc.d/*` and check if sshd comes before jail
-
zip
sure
-
zip
looks like I have both sshd and openssh running before jail, although they also report that they're the same PID..
-
zip
oh for... it's coming up without an ipv4 router, that can't be helping
-
zip
this is a large part of why I'd rather not be faffing with routing on this machine, a lot of things have to go right
-
zip
I do have the gateway set in `rc.conf`
-
spmzt
Has anyone successfully set up an IPv6 road warrior scenario with swanctl/openiked-portable using Android clients?
-
spmzt
I cannot make it work. For IPv6 support, I tried StrongSwan 6 and openiked-portable on FreeBSD 14-Stable. It works with Linux clients, but not with Android. It seems like ESP packets are fine, but not UDP packets on port 4500
-
rtprio
i tried a couple of times and never got it either. wireguard was a lot easier :|
-
Remilia
spmzt: pure IKE/ESP Android tunnels are very very wonky
-
Remilia
you really want to encapsulate it in L2TP but that means mpd