-
warsoul
what is the last freebsd version?
-
b2ag
-
warsoul
b2ag how i upgrade from FreeBSD14.0 to 14.1?
-
b2ag
I have no clue. Only used FreeBSD by proxy in OpnSense and TrueNAS 😅
-
warsoul
ok thanks
-
warsoul
i just find out
-
warsoul
-
warsoul
im getting this error after doing upgrade from 14.0 to 14.1
-
warsoul
what do i need to do here?
-
b2ag
still no expert but I would try to edit /etc/pkg/FreeBSD.conf , decide between latest and quarterly (so delete the other line), remove the merge markers and try again
-
warsoul
merge are this }
-
warsoul
?
-
b2ag
"<<<<<<< current version"
-
b2ag
=======
-
b2ag
>>>>>>> 14.1-RELEASE
-
warsoul
ok remove the " on both url
-
warsoul
?
-
b2ag
no, remove the lines with <=> I pasted and decide which of the two url lines should stay
-
llua
if you want to avoid this in the future, use the lines in 14.0-RELEASE and make the change to latest in /usr/local/etc/pkg/repos/FreeBSD.conf
-
llua
14.1-RELEASE*
-
warsoul
llua what do i need tho change
-
warsoul
?
-
llua
read the line before i response
-
llua
delete: <<<<<<< current version, url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest", ======= and >>>>>>> 14.1-RELEASE
-
warsoul
ok
-
warsoul
llua only delete the === & >>>>
-
warsoul
llua it worked i think lol
-
warsoul
-
warsoul
im getting this error now
-
warsoul
-
warsoul
this is my FreeBSD.conf
-
scoobybejesus
lines 14 and 13 or 11 must be deleted
-
sequential
Hi all, I installed freebsd on my x220i today and I've been trying to set up sway. I've followed the documentation so far but when I launch sway none of the text displays correctly
-
sequential
-
nimaje
warsoul: the merge markers are the full line, not just the <<<<<<< / ======= / >>>>>>>
-
mane
can anyone link me a good guide to openvpn in jails?
-
mane
and apache24
-
mane
basically i never used jailes before :f
-
hadret
in such case probably starting with a handbook is the way to go:
docs.freebsd.org/en/books/handbook/jails
-
mane
hadret: can you lead me through running apache in a jail?
-
antranigv
mane do you want tools or do you want to use the base utils only?
-
mane
idk
-
antranigv
mane which FreeBSD are you on? and what file system are you using?
-
mane
14 zfs
-
mane
also i just started a basic classic jail and my networking froze :f
-
antranigv
mane no worries. we'll go step by step
-
mane
thank you
-
antranigv
you can use Jailer (
jailer.dev) which basically autogenerates the config files; or we can use the base tools, but things will be done manually
-
antranigv
> choose your options
-
mane
lets do this mainually
-
antranigv
(I feel like a game from the 70s, like Zork)
-
antranigv
good. let's create a Jail template, so you can use it multiple time
-
mane
i've created a basic classic jail but when i started it my networking instantly froze and i had to reboot
-
antranigv
start with creating a dataset for your jails; zfs create -o mountpoint=/usr/local/jail zroot/jails ; change path and pool as needed
-
antranigv
mane are you on bare metal (laptop, desktop, bare metal server) or on a virtual instance ?
-
mane
i'm doing that on my vps :f
-
antranigv
yeah, then we'll make sure you don't loose connection :) single IP I assume?
-
mane
yeah
-
mane
single ip
-
antranigv
let me know if the dataset is created
-
mane
it is
-
antranigv
then you can start creating a template; zfs create zroot/jails/14.0-RELEASE
-
antranigv
or 14.1, if you're on that
-
mane
created
-
antranigv
then, we'll "install" the base system, but we will not boot it
-
mane
ok
-
antranigv
we'll start by fetching base
-
mane
ok
-
mane
how?
-
antranigv
-
antranigv
if you're on arm, use arm64; or change version number as needed
-
mane
got it
-
antranigv
after the base is installed, we will extract it; tar xvf base.txz -C /usr/local/jails/14.1-RELEASE
-
antranigv
s/installed/fetched
-
antranigv
lol
-
mane
ok got it
-
antranigv
great! let's snapshot it so we can use it
-
antranigv
zfs snap zroot/jails/14.1-RELEASE@base
-
mane
i use 14.0
-
antranigv
I hope you also fetched the correct base.txz, right?
-
mane
i did
-
antranigv
good
-
mane
ok i got the snapshot
-
antranigv
now can create a new thick jail
-
mane
ok
-
antranigv
zfs send zroot/jails/14.0-RELEASE@base | zfs recv zroot/jails/www0
-
antranigv
this will make a replica of the base as www0
-
antranigv
or choose your jail name as you want
-
mane
ok i want it for apache so far
-
mane
done
-
mane
www0 it is
-
antranigv
great!
-
antranigv
now we need to choose; do you want VNET jails (it's own network stack); or old-school jails
-
antranigv
I recommend VNET jails, they are more... host-like
-
antranigv
but takes longer to configure
-
mane
maybe i should use an automated tool instead :f
-
antranigv
hahaha, maybe you should, but I recommend this manual way for the first time, just for you to understand the process
-
mane
it's too much work and there will be trouble while upgrading freebsd
-
mane
ok
-
mane
[root@vlepy ~]# zfs send zroot/jails/14.0-RELEASE@base | zfs recv zroot/jails/www0
-
antranigv
actually, when upgrading it will not matter at all, luckily!
-
mane
thats what i did last
-
antranigv
nice! okay since you want apache, it's better to use VNET jails
-
antranigv
now we'll create a bridge interface, a switch
-
mane
ok
-
mane
also i have lunch in around 30 minutes
-
mane
i can't skip it
-
antranigv
oh we're done in 5 minutes
-
antranigv
here's a switch config; sysrc cloned_interfaces="bridge0"
-
mane
cloned_interfaces: lo1 -> bridge0
-
mane
i had already a cloned interface
-
antranigv
and here's it's address config; sysrc ifconfig_bridge0="inet 10.0.0.1/24"
-
mane
ok done
-
mane
[root@vlepy ~]# sysrc ifconfig_bridge0="inet 10.0.0.1/24"
-
mane
ifconfig_bridge0: -> inet 10.0.0.1/24
-
antranigv
actually, my bad, to make sure it always works, let's use this: ifconfig_bridge0="inet 10.0.0.1/24 up"
-
antranigv
after that, we can start the switch! service netif start bridge0
-
antranigv
if all is done right, then you will have `bridge0` interface when you look with `ifconfig`
-
antranigv
if all is good, we can config the jail
-
mane
-su: netif: command not found
-
antranigv
it's `service netif start bridge0`
-
mane
it works!
-
antranigv
great! let's configure the jail
-
antranigv
service jail enable
-
antranigv
and finally, here's the config template
-
mane
done
-
antranigv
(does bsd.to still work? where can I paste)
-
mane
paste.debian.net
-
mane
maybe it's not bsd but it's a pretty good pastebi n
-
antranigv
thanks!
-
antranigv
here it is
-
antranigv
-
antranigv
save it in `/etc/jail.conf.d/www0.conf`
-
antranigv
it basically creates an epair interface ; attaches the interface to bridge0; attached the other end of the interface to the jail; and boots
-
antranigv
after you have the config there just run ; service jail start www0
-
antranigv
hopefully all went fine!
-
mane
what about host.hostname var in the config?
-
mane
why is it "${name}.bsd.am"
-
antranigv
you can do www0.yourhostname
-
antranigv
well because bsd.am is mine
-
antranigv
and I use jail name as subdomain
-
antranigv
:P
-
mane
ok
-
mane
:q
-
antranigv
the log file is a console log, if something fails at boot time, you can have a look at /var/log/jail-jailname.log
-
antranigv
if all is done, you should have a jail! `jls` will show the jail
-
mane
jail: www0: /sbin/ifconfig lo0 127.0.0.1 up: failed
-
antranigv
that's the first command; I wonder if the jail path is not correct?
-
mane
i think it's correct
-
mane
# ls /usr/local/jails/
-
mane
14.0-RELEASE 14.1-RELEASE containers media templates www0
-
mane
path = "/usr/local/jails/${name}";
-
antranigv
looks pretty correct
-
antranigv
what about: ls /usr/local/jails/www0
-
mane
nothing in there
-
antranigv
zfs send/recv has been failed then; weird!
-
antranigv
zfs list | grep base
-
mane
nothing
-
antranigv
snapshot failed?
-
mane
if so the silently
-
mane
then*
-
antranigv
zfs list | grep 14.0
-
mane
zroot/ROOT/14.0-RELEASE-p6_2024-08-05_131333 8K 20.1G 4.94G /
-
mane
zroot/ROOT/14.0-RELEASE-p8_2024-08-05_132802 8K 20.1G 7.16G /
-
mane
zroot/jails/14.0-RELEASE 96K 20.1G 96K /usr/local/jails/14.0-RELEASE
-
antranigv
hah!
-
antranigv
ls /usr/local/jails/14.0-RELEASE ?
-
mane
nothing
-
antranigv
whaaaa; extraction failed?
-
antranigv
that would make sense!
-
antranigv
this got me worried now
-
antranigv
mane that means either the download failed (of the base.txz) or the extraction failed
-
antranigv
everything else seems right
-
antranigv
mane I'm having lunch time too in a bit; meet after lunch?
-
mane
so what should i do now?
-
antranigv
mane make sure it's extracted? there's a way for that
-
mane
i wont have much time afte lunch but ok , just tell me whether it's sufficient to just redownload and re-extract data
-
antranigv
mane yes it would be
-
antranigv
mane and then re-follow the steps!
-
antranigv
mane and ping me here if needed!
-
mane
antranigv: are you back?
-
antranigv
never left ;p
-
mane
:D
-
mane
i've wgeted wromg base system
-
mane
[root@vlepy ~]# zfs snap zroot/jails/14.0-RELEASE@base
-
mane
cannot open 'zroot/jails/14.0-RELEASE': dataset does not exist
-
mane
antranigv: ^
-
mane
[root@vlepy ~]# service jail start www0
-
mane
Starting jails: cannot start jail "www0":
-
mane
ifconfig: interface epair10 already exists
-
mane
jail: www0: ifconfig epair10 create up: failed
-
mane
[root@vlepy ~]# service jail start www0
-
mane
Starting jails: www0.
-
mane
antranigv: ok i got it started
-
mane
what now
-
antranigv
back
-
antranigv
okay
-
antranigv
mane let's see what you have now; jls name ; ifconfig -l ; zfs list -t all | grep 14.0
-
mane
[root@vlepy ~]# jls
-
mane
JID IP Address Hostname Path
-
mane
2 www0.vlepy.com /usr/local/jails/www0
-
mane
[root@vlepy ~]# ifconfig -l ; zfs list -t all | grep 14.0
-
mane
vtnet0 lo0 lo1 pflog0 tun0 bridge0 epair10a
-
mane
zroot/ROOT/14.0-RELEASE-p6_2024-08-05_131333 8K 18.8G 4.94G /
-
mane
zroot/ROOT/14.0-RELEASE-p8_2024-08-05_132802 8K 18.8G 7.16G /
-
mane
zroot/jails/14.0-RELEASE 433M 18.8G 433M /usr/local/jails/14.0-RELEASE
-
mane
zroot/jails/14.0-RELEASE@base 0B - 433M -
-
antranigv
looks like
-
antranigv
everythign is runngin
-
antranigv
good job
-
mane
thanks :D
-
mane
what now?
-
antranigv
mane try doing `jexec -l www0`
-
antranigv
and you should be in the jails!
-
antranigv
s/jails/jail
-
mane
jexec: execlp: /usr/local/bin/bash: No such file or directory
-
antranigv
oh
-
antranigv
in that case
-
antranigv
jexec www0 /bin/sh
-
mane
yea got it
-
antranigv
now this covers the jail itself, now if you want inet access, we will need to configure basic NAT
-
mane
jail has no internet access
-
antranigv
-
antranigv
now we'll do basic NAT
-
antranigv
mane are you running any firewall right now?
-
mane
yeah
-
mane
pf
-
antranigv
pf? ipfw?
-
antranigv
good
-
antranigv
just add this then
-
antranigv
nat pass on vtnet0 inet from 10.0.0.0/24 to any -> vtnet0:0
-
antranigv
and finally `service pf reload`
-
mane
works :D
-
mane
what now?
-
mane
keep typing, i'll have a quick lunch
-
antranigv
mane go back to the jail and try to... ping something?
-
antranigv
idk; now you have a jail, it works, I guess you can `pkg install nginx` now
-
antranigv
or apache, I think
-
antranigv
oh you might want to make it accessible from outside, right?
-
antranigv
rdr pass on vtnet0 inet proto tcp from any to vtnet0:0 port 80 -> 10.0.0.10
-
antranigv
you get the idea
-
mane
Yeah
-
mane
I get it thank you a lot :D
-
mane
You’re awesome :D
-
antranigv
sure; anytime :)
-
mane
<33
-
mane
antranigv: dns is not resolving on the jail
-
antranigv
mane `echo nameserver 9.9.9.9 >> /etc/resolv.conf` in the jail
-
mane
i got it it's not working
-
mane
it's not resolving
-
mane
# echo 'nameserver 208.67.222.222' > /etc/resolv.conf
-
mane
# ping google.com
-
mane
and nothign
-
mane
ping: Unknown host
-
antranigv
weird
-
» antranigv thinking
-
antranigv
ping 10.0.0.1 works, right?
-
antranigv
if so, then can you share your host's pf.conf in a pastebin?
-
mane
ping 8.8.8.8 works as well
-
mane
-
antranigv
change to this
-
antranigv
set skip on { lo0, bridge0, epair }
-
mane
# ping google.comq
-
mane
ping: Unknown host
-
antranigv
mane you did reload pf, right?
-
antranigv
can you ping IPs? like 208.67.222.222 ?
-
mane
# ping google.com
-
mane
ping: UDP connect: No route to host
-
antranigv
huh a route issue! weird I thought I fixed that in the jail conf. my bad!
-
mane
64 bytes from 208.67.222.222: icmp_seq=0 ttl=60 time=3.708 ms
-
antranigv
oh that works!
-
antranigv
nice!
-
mane
antranigv: works
-
mane
:D
-
mane
antranigv: you're awesome!!
-
mane
:D
-
mane
thanks you so much :D
-
antranigv
anytime!
-
mzar
/7/7
-
mzar
err
-
antranigv
mane reboot the vm, just make sure all works fine *after* a reboot.
-
mane
well gonna configure firewall and apache on the jail
-
mane
it's bootstraping pkg right now
-
antranigv
since the jail is *behind* the host, you can just configure things on host's pf
-
antranigv
and for apache, a simple install, enable and start should do it
-
antranigv
when you add the rdr, the jail's apache should be reachable from the outside world as well.
-
mane
one more thing
-
mane
the nat is very slow
-
mane
i had this before on openvpn
-
antranigv
mane common issue with vtnet interfaces
-
mane
what should i do then?
-
antranigv
mane try doing this: ifconfig vtnet0 -rxcsum -txcsum
-
antranigv
your connection will be lost for a second and then it will be back
-
antranigv
and the nat issue should be fixed
-
mane
you're a wizard :D
-
mane
how would i add the option at boot time?
-
antranigv
more like a Jedi, but sure :P
-
antranigv
mane oh yes; sysrc ifconfig_vtnet0+=" -rxcsum -txcsum"
-
mane
thanks you :-)
-
mane
Performing sanity check on apache24 configuration:
-
mane
[Sat Aug 10 11:00:50.921580 2024] [:crit] [pid 70819] (2)No such file or directory: AH00141: Could not initialize rand
-
mane
om number generator
-
mane
Starting apache24.
-
mane
antranigv:
-
mane
idk about htis one
-
antranigv
I haven't used apache in 10 years, but I think that's just a warning? I'm not sure
-
antranigv
it didn't start huh?
-
antranigv
service apache status ?
-
mane
it failed to start
-
» antranigv thinking
-
antranigv
in the jail, what happens if you do `ls /dev` ?
-
mane
# ls /dev
-
mane
null
-
antranigv
ah
-
antranigv
okay in that case
-
antranigv
exit the jail and stop it; service jail stop www0
-
mane
also, how will i configure the jailed apache to serve sites on various domains
-
antranigv
and then let's add this into the jail.conf.d/www0.conf file: mount.devfs;
-
antranigv
add that right below persist;
-
antranigv
and then start the jail: service jail start www0
-
antranigv
maybe we can add other things too?
-
antranigv
nah devfs should be enough
-
mane
One sec
-
mane
wors antranigv
-
mane
now what about domains?
-
antranigv
mane right; that's outside of the scope of jails; basically you should point the domains to your server
-
antranigv
and then configure apache to use virtual hosts
-
antranigv
for each domain
-
mane
also your firewall port redirection directives didnt work
-
mane
antranigv: i got that working bt without jails ^^"
-
antranigv
mane I don't think I saw it in your config; can you check or send the latest pf.conf?
-
antranigv
mane oh then you get the idea!
-
antranigv
basically all we did is create a jail, and then move all traffic of port 80 to the jail
-
mane
yeah but the vm is isolated from the network
-
antranigv
(well, it didn't work, let's check, lol)
-
mane
it would be better if it didn't work behind nat
-
mane
but used same interface as the host
-
mane
can we use same ip on the vm as the host?\
-
antranigv
that would be, impossible, with one IP
-
antranigv
for example, say your VM is 1.2.3.4
-
antranigv
well if you have another IP, you can set it to the jail, say 1.2.3.5
-
antranigv
otherwise you either have to do port redirection, or you have to... run web server on the host
-
mane
ok i'll do the vm for openvpn then
-
mane
and xonotic
-
antranigv
what's xonotic?
-
mane
an fps game like quake :D
-
antranigv
mane that's cool! instlaling now
-
mane
we wont play today
-
mane
but we can tomorrow
-
antranigv
god that's a big game
-
antranigv
I hope the zip file has the mac version
-
mane
can you give me a working redirection rule?
-
mane
antranigv:
-
antranigv
yes, lemme check my server
-
mane
i will switch xontic to a jail asap
-
antranigv
rdr pass on vtnet0 inet proto tcp from any to vtnet0:0 port 80 -> 10.0.0.10
-
antranigv
do the same for other ports, such as 443
-
antranigv
and when you create a xontic jail, do for it too
-
antranigv
put this right *after* nat
-
mane
[root@vlepy ~]# pfctl -f /etc/pf.conf
-
mane
/etc/pf.conf:18: syntax error
-
mane
pfctl: Syntax error in config file: pf rules not loaded
-
mane
ok i got it working derp
-
mane
was my fault, i've placed it on a wrong part of the file
-
mane
thanks
-
mane
antranigv: ok works great :D
-
antranigv
lol
-
antranigv
nice
-
mane
antranigv: feel free to join my xonotic server vlepy.com :)
-
mane
i will go nww, if i'll be able to work tomorrow for sure i will come again
-
yamada
mane: does xonotic server run on freebsd?
-
mane
Yes, it even comes from the repository (-:
-
warsoul
nimaje what should i delete?
-
warsoul
hello fam
-
warsoul
-
warsoul
im getting this error now
-
warsoul
-
warsoul
this is my FreeBSD.conf
-
nimaje
warsoul: to avoid merge conflicts in the future I suggest overriding stuff via /usr/local/etc/pkg/repos/FreeBSD.conf instead (but no idea why it couldn't merge correctly for you, afaik it should do a three-way merge)
-
nimaje
-
warsoul
nimaje
-
warsoul
fixed i erased 14.1-RELEASE
-
warsoul
thank you
-
warsoul
when im not using computer in a few minutes monitor will go black how can i change that?
-
mane
antranigv: can I pass only one device from devfs to the VMware?
-
mane
To the vm
-
antranigv
mane what? o.O
-
mane
Autocorrection
-
mane
Can I pass only /dev/tun0 to the jail instead entire devfs
-
mane
Because I want to make another jail just for openvpn
-
s2r
mane It seems we are trying to to the same thing at the same time. :) I didn't figure it out yet, I'm using tailscale.
-
s2r
I've got it running but with vnet
-
jmnbtslsQE
mane: you can add an entry to /etc/devfs.rules and then start the jail with that ruleset using the devfs.ruleset parameter
-
mane
What entry?
-
jmnbtslsQE
i think i saw an example somewhere recently - let me check
-
mane
Ok
-
jmnbtslsQE
-
jmnbtslsQE
i think that is also what i've done in the past, though i can't remember and not sure if i did the exact same thing
-
mane
Thanks :3
-
mane
Do we count jails starting with 0 or 1?
-
jmnbtslsQE
i think 1
-
jmnbtslsQE
not sure if you want tun* or just tun there actually
-
mane
tun0 is enough
-
mane
When will the openvpn bug be fixed in 14.0?
-
mane
Or will it be only fixed in 14.1
-
enyc
warsoul: in X11 environment, or otherwise? Desktop environment installed? etc... more inforamtion will probably help aothers answer your question, hopefully.
-
meandrain
is it possible to mount exfat in freebsd without fuse ?
-
asvln
is it be possible to do a fresh install of freebsd from within an already created root-on-zfs installation? (to retain non-freebsd filesystems in the pool)
-
CCFL_Man
my /tmp got corrupted
-
CCFL_Man
is there a way to rebuild it?
-
CCFL_Man
i had to clear an inode and fsck to recover the root file system
-
CCFL_Man
df: /tmp: Bad file descriptor
-
aquamo4k
ufs I'm assuming?
-
CCFL_Man
yes
-
aquamo4k
is /tmp on / or separate file system?
-
CCFL_Man
it's on /
-
aquamo4k
can you mv it to a tmp.BAD , mkdir /tmp ; chmod 1777 /tmp ? sounds like your root is still broken
-
aquamo4k
so maybe do a backup and then try surgery
-
aquamo4k
assuming you aren't using tmpfs for tmp too
-
aquamo4k
hard to tell without precise details though
-
CCFL_Man
i might have to do a backup
-
CCFL_Man
# mv /tmp /tmp.BAD
-
CCFL_Man
panic: Bad effnlink fip 0xfffff8013c9d3280, fdp 0xfffff80003a19640, tdp 0xfffff80003a19640
-
CCFL_Man
what happened was the serial console was connected to a serial terminal server. the serial terminal sercver would reboot during power failures and send charactes in the form of it's menu text throufgh the console and that ended up doing some bad stuff while root was logged in
-
nimaje
did you already try fsck?
-
CCFL_Man
yeah, i had to repair an inode in fsdb
-
jbo
kevans