-
drg99
Hi, I am looking into hardware for wireguard to setup some VPNs on FreeBSD 14 and single internet exit point. Anyone knows some cheap hardware for this use case?
-
deimosBSD
drg99: a rpi4+ or i3-class cpu will probably do fine depending how fast your internet speeds and how many rules you want to maintain
-
drg99
deimosBSD: I want to have some sort of redundancy too: 2 x hardware per site. I think I will need 3 Ethernet ports for this: 1 for LAN, 1 to WAN and 1 port for keepalived between devices and I am looking into options since 1 site will need 100 Mbps but one site will require 1.5 Gbps
-
deimosBSD
you could buy 2 cheap protectli devices and run opensense on them
-
deimosBSD
opnsense being based on freebsd
-
drg99
interesting
-
drg99
deimosBSD would it allow my keepalived, I never used OPNSense thats why I ask
-
jauntyd
n/exit
-
deimosBSD
-
drg99
deimosBSD thanks, I will check it
-
drg99
deimosBSD, one more question please: why not pfsense?
-
deimosBSD
drg99: personal choice
-
drg99
I see
-
drg99
deimosBSD, but would it be a struggle to buy 2x protectli per location and use it with only pure FreeBSD 14? I only need IPSec VPN or wireguard and single internet exit point
-
tjpcc
I can't get vnet jail networking to function. I just get nothing back from pings, or any attempts to send packets. configuration:
paste.debian.net/plain/1324209
-
tjpcc
but the high level: I set up a bridge in rc.conf and give it 192.168.0.128/24. I have an epair where the host ('a') gets 192.168.0.1 and the jail ('b') gets 192.168.0.129, and I give the jail "route add default 192.168.0.128" in an exec.start script
-
tjpcc
strangely I can get a single packet through (for example "ping google.com") but only right after the jail starts up
-
tjpcc
but after that, nothing from ping whether to a domain name or a known IP address (such as 192.168.0.128 - the gateway)
-
tjpcc
I've enabled the sysctl net.inet.ip.forwarding as well
-
last1
I swear to ***, linux is a post. you want to install a package, you search for it, it just prints dumb stuff like 'apache2'
-
last1
no version, no subversion
-
last1
need to remember 10 000 switches for what should be a simple operation
-
voy4g3r2
the "value" of flexibility right there.. at the cost of simplicity
-
last1
they are just retarded, plus you need to know apt, dpkg, rpm, zypper or whatnot
-
last1
pkg search apache2 apache24-2.4.62 Version 2.4.x of Apache web server
-
last1
FreeBSD is just beautiful
-
last1
not to mention that 6 days after some major cve's, and 2.4.62 being out, Debian still sports 2.4.61
-
drg99
last1: its just a little bit behind, not much, actually 2.4.61-1~deb12u1. Debian package search does not seem to work now but if we look at Ubuntu is almost the same
changelogs.ubuntu.com/changelogs/po…apache2_2.4.58-1ubuntu8.4/changelog with
downloads.apache.org/httpd/CHANGES_2.4.62
-
drg99
it only misses one CVE, CVE-2024-40898
-
last1
yeah but it's a pretty big cve
-
last1
big enough to have compliance/audit companies breathe down your neck if their automated scanning tools detect you are out of compliance
-
deimosBSD
drg99: obviously, yes you can do what you want in pure freebsd. it's a matter of time to do it yourself vs having preconfigured tools to make it quicker and possibly less error prone
-
tjpcc
ok I have a minimal reproduction of my problem, and I've confirmed that I can do this successfully on other freebsd machines:
paste.debian.net/plain/1324253
-
tjpcc
interfaces just can't find each other between host/jail across an epair
-
tjpcc
since i can do this successfully on other machines I can only imagine it's a problem with this vm? but how could I even go about diagnosing that?
-
drg99
last1, deimosBSD, yes, just was thinking about it
-
mrelcee
Ive got an odd one im trying to sort out. Vm-bhyve, freebsd 14 and now 14.1. Debian Cli/images that were made to boot under uefi, zfs on root, zbm bootloader so was easy to roll back a kernel.
-
mrelcee
What imhave mostly works. However often i have to restart it several times.. or connect with vnc abort the boot countdown and either let it sit a bit or just keep retrying becsuse it just dies when it tries to boot root off the zfs pool.
-
mrelcee
Ive dd'd the inage to real hardware. It boots every time. Fiddled in the efi partition.. csnt get it to reliably boot under bhyve
-
mrelcee
Not really seeing it as a debian problem with it always working on physical hardware.
-
mrelcee
For grins, i took a manjaro linux install. And set that up same it boots every time. Just isnt ideal as i was avoiding the X desktopmoverhead..
-
mrelcee
Could be zbm bootloader strangenes i suppose.. ive used a stock compiled release and gone the route of a custom compile.
-
mrelcee
Guess i could give booting it with qemu and virtualbox a shot.
-
mrelcee
When it dies it the vnc session dies. No errors ever make it to a screen, see nothing in any logs.
-
scoobybejesus
tjpcc: are you supposed to be giving the bridge an IP address? i don't recall why that might be problematic, but i seem to remember you're only supposed to give an IP to either the bridge or the .. something else.. and it's usually the something else and not the bridge ... but my memory is failing.. hope that helps
-
tjpcc
scoobybejesus: yeah I think you're right, I removed that
-
tjpcc
I isolated it to something in my jail.conf, because if I move that file out of place I can get that minimal test to work
-
tjpcc
-
mrelcee
#debian points at bhyve.. i am almost there agreeing. Theres a lot of parts in motion here to point fingers at.
-
rtprio
mrelcee: are those images public? i'd try one. i run debian in bhyve but not with a zroot
-
mrelcee
No just exists on my server
-
mrelcee
Id need to scrub some things from it to be comfortable sharing
-
rtprio
i understand
-
mrelcee
I had set it up as a template vm i could clone and create a new copy quickly if i needed to deploy a new vm.
-
rtprio
pre-installed?
-
mrelcee
Yes. With a shell script to go through and generate new system ssh keys and everything else to set a hostname and make it a unique machine when i needed one.
-
mrelcee
That part works, once it boots.
-
dvl
When root has an sh shell, some rc.d scripts don't start (PATH related) - with a csh shell, those broken rc.d scripts start. Now I'm searching how to adjust the PATH on an sh shell to include (what I think is missing:) /usr/local/bin /usr/local/sbin - ideas?
-
rtprio
do they run properly when started with 'service'
-
rtprio
?
-
dvl
rtprio: That is what I am using: "sudo service foo restart"
-
rtprio
i have never seen that before
-
Juliaaa
log_in_vain="YES"
-
Juliaaa
is this option goood?
-
rtprio
Juliaaa: depends on what you're trying to accomplish
-
rtprio
net.inet.tcp.log_in_vain: Log all incoming TCP segments to closed ports
-
rtprio
i presonally don't think it would be useful
-
debdrup
tcp(4) defines it as a sysctl, so setting it as a variable for rc(8) isn't going to do much good.
-
rtprio
its one of those too: ./defaults/rc.conf:log_in_vain="0"
-
Juliaaa
i was told its good security habit
-
Juliaaa
"you should log
-
Juliaaa
connection attempts to ports without listeners/daemons. To do this
-
Juliaaa
simply add the following line to /etc/rc.conf"
-
Juliaaa
"Now, failed connection attempts to ports without listeners will be
-
Juliaaa
recorded to /var/log/messages."
-
rtprio
but it's not really actionable is it?
-
Juliaaa
i dunno
-
Juliaaa
thats why im asking u guys
-
vkarlsen
I do that in special circumstances, but not as a "habit"
-
Juliaaa
ok
-
rwp
Reading the recent scrollback... I always configure a firewall on hostile Internet facing systems. That way malicious agents can't poke at anything except what is allowed. To protect accidents from installing something or exposing something that I wasn't thinking about malicious agents when I installed it.
-
rwp
I have always assumed that everyone installed one of the firewalls just as a standard operating practice when operating on the Internet. No?
-
rwp
I always test my systems using nmap to scan my own systems too. That way it will report to me and then I can review the ports and catch anything surprising.
-
rwp
dvl, Your report of PATH problems surprises me and makes me suspicious. "service" sets PATH to the same path that is used at boot time. If an rc script fails due to PATH when using service then it would also fail at boot time for the same reason.
-
dvl
rwp:It was confirmed, changing the root shell affected the success/fail of that rc.d script/service.
-
rwp
Ports installing rc scripts in /usr/local/etc/rc.d/foo and needing PATH set I presume will be required to set PATH and when I look on my systems I see that those installing there (such as git-daemon in the git pkg) do.
-
dvl
rwp: they set PATH within their rc.d script?
-
rwp
Yes. I assume you will have git installed as a pkg somewhere: /usr/local/etc/rc.d/git_daemon
-
dvl
Confirmed, just tested it again. service foo restart; success. vipw, change root shell from csh to sh; service foo restart; fails (because 'env ruby' as the shebang fails).
-
rwp
That's specifically due to git being a wrapper and the actual commands being in libexec but still.
-
dvl
^ ruby? Not sure yet that it's ruby failing, I just know that the restart fails to launch the restart.
-
rwp
What's the exact error message from env ruby?
-
rwp
I would expect "#!/usr/bin/env ruby" to work for example.
-
dvl
Without revealing much: Could not find a JavaScript runtime
-
dvl
Thats the problem so far, tracking down the exact cause.
-
ridcully
rwp: s/hostile internet facing// ftfy
-
rwp
I will happily run away from node.js stuff without too much curiosity.
-
dvl
The "change root shell from csh to sh" is an interesting fact though.
-
rwp
ridcully, You don't like capitalizing the word Internet? It's a defined named thing.
-
rwp
It's like if someone were facing me and described as "hostile Bob facing". :-)
-
rwp
Which would be different from "hostile bob facing" as I think that would be more generic. But yet if someone had a hostile internal LAN such as between two companies working together but not trusting each other than "hostile internet facing" would apply to the other entitity. Sure.
-
rwp
s/than/then/ But on IRC we type in the moment and one can't get too obsessed with always correct syntax and grammar. We don't when we are talking face to face with people.
-
rwp
dvl, That is fascinating! I am very curious as to the detail of the problem. Please let me know! :-)
-
rwp
If the file is not executable and the shell is interpreting it itself then that would make different results.
-
rwp
dvl, Does it depend upon the setting of SHELL in the environment?
-
dvl
rwp: I do not know. The rc.d script runs a command, that command launches some ruby processes into the background. The rc.d is /bin/sh, which launches a bash script, which runs some rails stuff.
-
rwp
Ahem... /bin/sh would be a shell script and /bin/bash or /usr/local/bin/bash would be a bash script.
-
rwp
If it is /bin/sh then there is no bash involved there at all.
-
dvl
rwp: the rc.d script is a /bin/sh script. In there, it runs a bash script i.e. it run /usr/local/bin/foobar
-
rwp
Okay. Apologies.
-
rwp
The other thing I think of is that it would be an abomination and therefore likely if something is obtaining the user's login shell and running it on something.
-
dvl
We shall see. But not today. On to more urgent items.
-
rwp
Good hunting!
-
scoobybejesus
dvl, the same happened to me (well, maybe you described differently). script ran normally in FreeBSD 13-RELEASE. in 14-RELEASE, i kept getting something like daemon: error php doesn't exist, or something like that. eventually i realized it literally wasn't finding /usr/local/bin/php anymore. the PATH within rc changed.
-
scoobybejesus
but i think i'm surprised it happened to you now, since i thought you were on 15-CURRENT
-
dvl
scoobybejesus: This is at work and it's 13.2 (doing OK) and 13.3 (hit the problem with /bin/csh -> /bin/sh)
-
rwp
At this point I am suspicious of SHELL interaction since that's another likely offender.
-
scoobybejesus
I connect the /bin/csh -> /bin/sh issue with the upgrade from 13-RELEASE to 14-RELEASE, though I suppose that *only* changed the default root shell, so i suppose it shouldn't be related to changes in how rc scripts behave.. though i think there were changes to /bin/sh that made it capable enough to serve as the default shell
-
rwp
"capable enough to serve as the default shell" is what was said elsewhere too but I am curious exactly what subjective features these were? (Can't be objective about UI features.)
-
kevans
service(8) was fixed to operate in an environment closer to what scripts would run in at init time
-
kevans
i don't remember which release that aws, though
-
rwp
I think "service" behaving as closely as possible to boot init time is the correct behavior.
-
gh00p
Hallo. Some general advice, please. I've built a tool that creates and manages jail configs. I want to run it in different environments without having to customize the code. Should I add something like ansible ot terraform as a dependency, or write something bespoke?
-
rwp
gh00p, There is no simple answer. It depends. For me personally I do not use ansible or terraform but am using my own infrastructure. If something were to depend upon ansible or terraform then that would block me from using it. I imagine the same would be true of people using salt or puppet or chef.
-
rwp
However someone using ansible or terraform would probably like it because they are using ansible or terraform.
-
rwp
Those types of dependencies do make systems more rigid and inflexible though. So regardless my opinion is to avoid requiring such dependencies.