-
mns
I created my vnet jail based on
docs.freebsd.org/en/books/handbook/jails and networking was working, uptil Oct 30th. Now though, I can't reach out the internet from inside the jail, nor can I reach the jail fromthe outside. I can't even ping the jali's gateway from inside the jail. No configuration changes have been made, I've verified that.
-
mns
I did do an upgrade to 14.1-RELEASE-p6, which I don't think should matter as its not a kernel upgrade.
-
mns
Any thoughts or suggestions?
-
rwp
I hear "No configuration changes been made, I've verified that" and I must laugh because everyone *always* says that! :-)
-
rwp
If you have snapshots you can diff between to verify by the way. And if it really is the patch upgrade you could use Boot Environments to boot the previous and it should work if that is the change that broke something.
-
rwp
Meanwhile... Double check /etc/pf.conf and enure it is set up everywhere it is needed.
-
mns
rwp: yeah I know, that's why I mentioned that *after* checking. :-)
-
rwp
And of course /etc/jail.conf and /etc/rc.conf with cloned_interfaces and ifconfig_bridge0 type configuration is the critical points.
-
mns
I have /etc/pf.conf setup on the host. I've verified the /etc/jail.conf and /etc/rc.conf, with teh bridge0 and epairs as well.
-
rwp
I am running 14.1-RELEASE-p5 kernel and 14.1-RELEASE-p6 userland and things work here with that combination.
-
mns
I've run netstat -rn inside the jail but the gateway entry doesn't seem right to me, as it shows epair151 for the interface, and I was expecting epari151b as the interface
-
rwp
However my jails are in need of upgrade. I haven't gottenaroundtuit yet. And I can't pfctl -sr or it coredumps due to the mismatch. Which is annoying.
-
mns
pfctl inside the jail or outside?
-
rwp
One of my vnet jails is a router for other jails on a labbench network setup and needs to have routing set up inside.
-
mns
yours sounds complicated, mine is just a simple, straightforward web server, using the vnet example in the Handbook
-
rwp
My jails show my epair ja0 without the a and ja0a is a member of bridge0 leaving ja0 to be attached to the jail.
-
mns
ok so the netstat output is correct in that case, comapred to yours
-
rwp
Yours is a vnet jail? On the host side "ifconfig bridge0" (use your bridge name) should show the 'a' epair as a member of it. (I think the ends can be swapped symmetrically. What's in a name?)
-
rwp
And it should also show your network device. And if that is your only network device then your IP should be associated on the bridge.
-
rwp
(I am running mine on a multi-NIC system so I attach the bridge to the secondary NIC and don't assign any address there.)
-
rwp
Oops. I looked at the time and I must run off. Sorry. Good luck!
-
mns
yeah I see the epair151a as a member of my bridge (jail0)
-
mns
I have a single interface, bge0
-
mns
thanks, no problem
-
mns
hmm I don't see any ip for epair151a
-
Jeanne-Kamikaze
Where do people get their /usr/ports from, bsdinstall, or a git clone post-installation? The handbook seems a bit ambivalent as to which is the preferred approach.
-
mns
Jeanne-Kamikaze: I get mine via git
-
Jeanne-Kamikaze
Is that preferred for development these days? And is it OK to yank an existing /usr/ports in CURRENT and replace it with a git clone?
-
HER
Jeanne-Kamikaze: porstnap fetch extract iirc
-
HER
-
Jeanne-Kamikaze
Thanks
-
HER
Jeanne-Kamikaze: also you should consider using poudriere to build ports
-
Jeanne-Kamikaze
Is that mostly to guarantee that stuff works on a clean state? I'm a noob, just working through the handbooks right now. (I also seem to have run into a kernel panic with amdgpu on a current gen AMD GPU.)
-
HER
Jeanne-Kamikaze: there is nothing wrong if you want to build ports locally from /usr/ports . Also you can probably skip that and use the binary ports from pkg that should work just fine and you wont need to build anything
-
HER
Jeanne-Kamikaze: and with poudriere, it can run inside a jail and build the ports you want and then you can re-use them in other machine. Since you are learning, you probably dont need to configure poudriere now.. but maybe in the future you might consider it
-
HER
Jeanne-Kamikaze: i would just install using pkg
-
HER
pkg update ; pkg search firefox ; pkg install xorg i3wm firefox ...
-
Jeanne-Kamikaze
I'm going to start with that, thanks.
-
HER
if you want to build, no problem, but it might take very long =p and once you run a "make install", you will get multiple config screens after each port is built. its possible to run all the recursive configs with the command "make config-recursive"
-
HER
Jeanne-Kamikaze: yeah just go with pkg
-
HER
also, dont mix pkg with port
-
HER
thats not reacommended
-
Jeanne-Kamikaze
How do you go about to contributing to a random piece of userland software? Do you pkg install most things except for that one, which you build/modify from ports?
-
HER
Jeanne-Kamikaze: also, since you got some kernel panic, it should work.. but you may also test with the
nomadbsd.org/screenshots.html
-
HER
nomad should figure out the graphics setttings and even if you dont install it, you can see if it autodetects everything
-
HER
ghostbsd is also similar
-
HER
Jeanne-Kamikaze: well you can do that yes.. but thats not recommended.
-
HER
Jeanne-Kamikaze: also use ZFS if you can, that way you can always create a snapshot before you do anything... and rollback if needed
-
Jeanne-Kamikaze
Thanks. Yeah, ZFS is the default now in bsdinstall.
-
mns
˜/quit
-
vxwarlock
-
vxwarlock
There are broken links on this page, can you please check them?
-
vxwarlock
Malicious people can take this address and create a link to themselves using your address.
-
sopparus
anyone got samba4 to work after win11 24h2?
-
polarian
brought this up many times, but yet to find a solution. so my home server and vpn server is on the same network (same public IP), wg-quick will set a path that the path for the physical interface is the public IP of the wireguard server, all other packets will then pass through wg interface which is then passed to the physical interface, however when i connect to my server which is a different
-
polarian
host behind the same router as the wireguard server it wont pass thorugh the wireguard tunnel and is leaked, which isn't a big deal apart from the metadata and less encryption on it, but some networks allow VPNs but block ports, plus I can't block public IP addresses accessing things on my server and mandate it through the tunnel if I cant tunnel
-
polarian
I can't change the route for the physical interface, freebsd wont let you remove default routes
-
polarian
besides it would break the tunnel
-
polarian
any suggestions on how to force the packets through wg
-
polarian
if I add a route to wg which is higher priority it would loop, wg --> wg --> wg --> wg surely...
-
rtprio
you can remove the default route but you would be dissapointed
-
rtprio
polarian: are both servers on nat?
-
DarkUranium
Any vm_bhyve users here? I can't for the life of me get networking working on the guest.
-
rtprio
DarkUranium: what's up
-
DarkUranium
Just starting with vm_bhyve (or bhyve in general) for the first time ever. I can't quite figure out why, but my (Alpine Linux) guest can't seem to be able to connect to the network. The vm_bhyve thing is setup as per instructions on GitHub, etc.
-
rtprio
what switches/bridges did you set up? either via rc.conf or vm-bhyve?
-
DarkUranium
I do have appjail on the same system, which might admittedly be interfering (tl;dr I'm trying out both)
-
DarkUranium
The only bridge I can see is the `vm-public` one from vm_bhyve. Connected to my external IF, renamed to `jext`.
-
DarkUranium
Well, "switch".
-
DarkUranium
I can paste all of ifconfig in a pastebin if desired, it's quite lengthy.
-
rtprio
does vm-public have the tun that corisponds to the alpine guest as well as your functioning host interface
-
DarkUranium
You mean tap, or?
-
rtprio
yes
-
DarkUranium
It connects to tap1 when the VM starts, but I'm not 100% sure where to check what the VM itself is attached to.
-
rtprio
there should be a note in the interface
-
rtprio
er, description
-
rtprio
tap13: flags=1008943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1500 description: vmnet/pihole/0/public
-
DarkUranium
"Opened by PID 15671"? Does appear to match the VM, yes.
-
DarkUranium
`vmnet/docmost/0/public` seems about right, so yeah, it appears connected
-
DarkUranium
(`docmost` is my VM name)
-
rtprio
yep
-
rtprio
what is the ip of the host and what is the ip of the docmost?
-
DarkUranium
Docmost doesn't have an IP (since it can't seem to reach anything). Host is 192.168.1.8.
-
DarkUranium
BTW, tap1 mac address doesn't correspond to that of docmost. Not sure if that's correct or not, just an observation.
-
Alver
... well, if it doesn't have an IP, not being able to reach anything is kind of expected. Or did you want to run DHCP?
-
DarkUranium
Basically, from the VM, I just get: `ping: sendto: Network unreachable` if I try to ping anything (even localhost)
-
DarkUranium
I mean, I know. I did try DHCP, I also tried assigning it an IP, but the assigned one didn't want to show up outside.
-
DarkUranium
I'd prefer DHCP, though.
-
DarkUranium
I can try a manual IP for now, since that's simpler (but it didn't help much last time --- I've recreated the VM since, during debugging)
-
rtprio
that shouldn't be necessary
-
rtprio
appjail?
github.com/DtxdF/AppJail ? running on the host?
-
DarkUranium
Correct. Like I said, I was trying out both. I am well-aware that the issues might be because of some network config conflict.
-
DarkUranium
(on an unrelated note, do you know of any SW other than CBSD that can handle both jails and bhyve?)
-
rtprio
IIRC that's the only one. i wasn't super keen so i keep using vm-bhyve
-
DarkUranium
Yeah, same.
-
DarkUranium
I've been tempted to try out SmartOS, TBH.
-
DarkUranium
It does both, but it's Solaris-based, not BSD.
-
DarkUranium
ANYWAY, this is my networking mess:
vpaste.net/73Zde
-
DarkUranium
jext is the external IF. em0 is unused.
-
DarkUranium
jext is a renamed wlan0 if it matters.
-
DarkUranium
In there, vm-public is vm_bhyve's switch and tap1 is the VM.
-
rtprio
not sure how the appjail could be interferring, but there is a lot going on there
-
DarkUranium
Same, I don't think it should be, but ...
-
rtprio
are you at all familar with tcpdump ?
-
DarkUranium
Not very. I think I might have briefly used it aeons ago.
-
DarkUranium
FWIW, I did check all the usual suspects like net.inet.ip.forwarding being enabled.
-
rtprio
console into your vm, and give it an ip
-
DarkUranium
Done.
-
rtprio
from your host, `tcpdump -ni vm-public `
-
DarkUranium
Done. There's a lot of traffic, mostly from the PC I'm sshing from.
-
rtprio
add a `port \! 22` will help with the ssh
-
DarkUranium
Was actually 54915 UDP, so maybe not that. Either way filter it, thanks.
-
DarkUranium
filtered*
-
DarkUranium
Note that now that I've assigned an IP manually, I can ping the host from the VM (and nothing else), and the VM from the host.
-
rtprio
it's a start
-
rtprio
ok, from the guest, try a uh, `fetch
freeebsd.org`
-
rtprio
er, that might not work since you'll see dns probably try to work and fail
-
rtprio
but you should see some packets from it
-
DarkUranium
Yeah, these: 14:39:44.030596 ARP, Request who-has 192.168.1.1 tell 192.168.1.9, length 28
-
DarkUranium
(also, s/fetch/wget/ because Linux)
-
rtprio
oh right, i forgot
-
rtprio
but no arp reply
-
rtprio
?
-
DarkUranium
Doesn't look like it, no.
-
DarkUranium
Sorry, multitasking.
-
DarkUranium
(something high-prio came up)
-
rtprio
no worriew
-
DarkUranium
Yeah yeah, no reply. Just those messages.
-
rtprio
tbh i don't know how bridging would work on wifi
-
DarkUranium
rtprio, shouldn't it be the same as non-?
-
rtprio
well, maybe
-
rtprio
now, if you can; tcpdump the wireless instead of the bridge and try a wget again
-
DarkUranium
15:07:13.322484 ARP, Request who-has 192.168.1.1 tell 192.168.1.9, length 28
-
DarkUranium
So basically, samer thing.
-
DarkUranium
s/r / /
-
rtprio
never a response?
-
DarkUranium
Nope.
-
DarkUranium
It feels as if the router isn't liking the (virtual) machine, for some reason.
-
rtprio
is it a consumer router, or can you tcpdump on it as well?
-
DarkUranium
Alas, consumer. I never brought the "proper" one over since I moved apartments.
-
DarkUranium
I generally rent servers, but for tests and such, I tend to do them at home, heh.
-
DarkUranium
I do have access to the router's ARP table, and the .9 doesn't show up there. Not sure if it's because of the static IP or not.
-
DarkUranium
(.9 == VM)
-
rtprio
it would still need to look it up, static or not
-
DarkUranium
I know. But maybe it's not showing the full table, is what I mean.
-
DarkUranium
I'm beginning to suspect some sort of a firewall issue on the host system. I do have pf running.
-
rtprio
... uh yeah
-
rtprio
that could impact things
-
Alver
Quite. :D
-
DarkUranium
Yeah, appjail depends on pf running, so :P
-
DarkUranium
Sorry, I forgot to mention it because I thought it was a given when I mentioned appjail ^^
-
DarkUranium
Forgot y'all might not be familiar.
-
rtprio
i don't know/use appjail
-
rtprio
well, then you're going to have to figure out how to extend the pf.conf from appjail to permit your VMs access
-
rtprio
or try it without appjail /pf to get the feel for things
-
DarkUranium
-
DarkUranium
Yeah, might be a good idea to just disable pf for now.
-
rtprio
i haven't had enough coffee to diagnose someone elses pf.conf
-
DarkUranium
lol fair
-
DarkUranium
It's just those 3 lines up top, though I must admit I'm not sure what *-anchor does in pf.
-
DarkUranium
rtprio, disabled all of appjail stuff, pf, etc --- rebooted --- still nothing :(
-
DarkUranium
ifconfig now only has vm-public, tap0, jext, em0, and lo0.
-
rtprio
and the wifi is still renamed to jext?
-
DarkUranium
Yeah, that's the one thing I didn't undo (yet)
-
DarkUranium
Guess I'll try that.
-
rtprio
i don't know, i run mine interface on a vlan
-
DarkUranium
Still nothing, even without the rename. It might be an Alpine-specific problem, but frankly, I'm calling it a day -_-
-
rtprio
i doubt it very much that this has anything to do with your vm
-
DarkUranium
So do I, but at this point, I'm about ready to start throwing things at a wall and seeing what sticks.
-
rtprio
we;;, i have had weirdness with bridging and wifi before
-
DarkUranium
Yeah, fair. I generally use wired for everything, but I happen to have run out of ports, and it's only a test thing anyway.
-
DarkUranium
rtprio, I just tried it with em0. Notably, `vm switch add public jext` (again renamed to keep config the same) took a few seconds, unlike before.
-
DarkUranium
Also, DHCP worked immediately. Huh.
-
DarkUranium
So yeah, it was wlan that was the problem, it seems?
-
DarkUranium
rtprio: So yeah, everything works now. I've no idea what's different with wlan vs eth, but ...
-
rtprio
i don't know, but as i suspected
-
rtprio
there are hacky was you could work around it, but they are hacky
-
uskerine
Hi, I have read somewhere that if you append a small amount of bytes to a file the operation is atomic. Could someone confirm/deny or provide more details on the expected FreeBSD behaviour? thanks
-
rtprio
uh, i don't think there's any empirical evidence of this
-
markmcb
is there any list of "whats new" in 14.2? it'd be nice if something like this was linked to on the release timeline page. without it, beta testing is reduced to "just see if anything breaks"
-
mzar
rtprio: it will be detailed listed here
freebsd.org/releases/14.2R/relnotes
-
rtprio
markmcb: looks like "not much"
-
markmcb
ok, thanks. just making sure there wasn't some hidden draft list everyone knew about but me.
-
CrtxReavr
This is some wierd shit to see in my auth logs:
termbin.com/sgqw
-
rtprio
CrtxReavr: ssh scanners
-
rtprio
quite common, not very weird, really
-
drijen
CrtxReavr: i think you should review your sshd setup/firewall
-
CrtxReavr
Did you get that suggestion off a cereal box?
-
rtprio
perhaps he means 'fail2ban' or similar
-
rtprio
i ignore them; with key only they're not going to get very far
-
CrtxReavr
Clearly they were sending \\admin as the username (or actually \\\\admin since the \s need escaped).
-
CrtxReavr
If you're authing against windows, you may need to send domain\\user
-
CrtxReavr
Seeing \\admin in the logs was just curious.
-
CrtxReavr
I did wonder if it might match a CVE or something.
-
rtprio
i've seen all sorts of weird shit
-
drijen
CrtxReavr: no need to be an asshole.
-
CrtxReavr
There's no need to spout inane nonsense, either.
-
rwp
Anyone operating a public Internet server is going to be subjected to the Internet background radiation of endless probes and attacks. That's just the normal thing these days.
-
rwp
Trust in the math. Just because someone is probing attempting an attack does not mean they are going to be successful. It's just a log filler.
-
rwp
To avoid them filling up the logs tools like fail2ban (and FreeBSD's blacklistd and sshd patches) are both useful to limit the miscreants.
-
uskerine
-
uskerine
would FreeBSD be POSIX-alike in this ?