02:56:12 i got a vps i set up to toy around with and i'm getting console messages "sshd: error: Fssh_kex_exchange_identification: read: Connection reset by peer" what did i mess up pls? can't find a clear answer searching web 03:22:47 demido, that's nothing you're doing. 03:23:16 If you connect ssh to the internet, it's going to get probed, scanned, & dictionary attacked. 03:23:50 That specific error usually occurs when something connects to your SSH port that doens't know how to speak SSH. 03:25:18 ie, they establish a TCP connection and send a: GET HTML/1.0 03:26:16 $standard_key_authentication_or_strong_af_passwords_lecture 03:31:31 ahhhh 03:31:35 tyvm CrtxReavr 03:39:01 crtxreavr@shodan-/home/crtxreavr$ sudo grep -c [F]ssh_kex_exchange_identification /var/log/auth.log 03:39:04 18 03:39:08 I've gotten 18 of them just today. 03:43:12 CrtxReavr is absolutely correct. 03:43:32 demido: Consider installing and configuring something like SSHGuard or Fail2Ban to block these. 03:43:37 i'm trying to set up a wireguard server that basically just directly passes everything from wg client out, and everything in to wg client. https://termbin.com/1em5 are those rules right? 03:43:43 ty 03:44:52 This is what a dictionary attack looks like: https://termbin.com/4oy8 03:46:03 wow lol 03:46:28 I just set: MaxAuthTries 4 03:46:46 Makes the attacks more time-consuming and annoying. 03:47:08 Hell, I should set that to 2. 03:47:35 demido: The rules look okay as long as the interface and ports are correct. Might need to finagle them a bit if you run into problems. But, it's a solid foundation. 03:48:13 CrtxReavr: Yep. I used to limit mine to 5. Then, changed to 4, then 3, now set to 2. 03:48:32 If someone can't get it right in two tries, they're obviously screwing something up and need help. 03:48:39 ek so help me understand something pls, how can i ssh into server? shouldn't rdr pass redirect ssh into 192.168.0.15? 03:51:53 demido: It looks like it should if SSH on 192.168.0.15 is running on port 2200. 03:52:30 is it because rdr only applies to udp? 03:53:22 Oh, yes. More than likely. I didn't even notice that was only forwarding UDP packets. 03:53:53 Change "udp" to "{tcp, udp}" and see if that helps? 03:55:21 must be the case because i just disconnected wg client then tried to reconnect and it won't pass traffic anymore. i guess it's like an infinite loop going on where the wg udp connection into server on port 6000 is being redirected to wg client ip that isn't connected anymore? 03:59:07 demido: It's possible. I'm not really sure how you have your stuff set up, so I'm not sure exactly what you would need to allow or re-direct. Is this firewall on a VM guest on a host? 03:59:17 Or is it on the host itself? 03:59:30 lemme add some details brb 04:05:42 https://termbin.com/a2xa 04:11:35 demido: Are you saying you're able to connect to both SSH and the WG server (with the client) but just not route out the WG client from the server? 04:37:59 didn't understand that but i'm going to rebuild config from ground up to better understand things 04:38:07 from pf.conf "When the interface    name  is  sur- 04:38:08          rounded  by  parentheses, the rule    is automatically updated when- 04:38:08          ever the interface    changes    its address.   The  ruleset  does  not 04:38:09          need to be    reloaded.  This    is especially useful with nat." why is that useful with nat? 04:44:13 Not sure what is meant by nat there, but the most common scenario is a dynamic WAN IP on a natting router, and parentheses allow network uplink to survive when DHCP changes the WAN IP 04:46:24 Note that "self" is also an interface name in this context, and often requires parentheses 04:47:14 I wonder why are the parentheses even needed and why isn't this the default behaviour, but I'm sure there is some historical reason 04:55:25 demido: Well, that's kind of why I was asking. I don't understand what would need to be NAT'd (if anything.) If the firewall is running on the host that will directly get the request, there's no reason to NAT anything. 04:55:58 You just pass in on the interface to whatever port you want to listen and pass simply pass out all. I would start simple and work your way up. 04:56:53 i thought wireguard server required a nat rule so traffic out of wg server from wg client appeared to come from wg server's ip? 05:02:16 The only time I've had to NAT (and it's outbound) is if I'm running WG and OVPN at the same time (just because of pfSense automated rules.) 05:02:43 It certainly can't hurt anything to outbound NAT from wg0 to vtnet0. If it needs it, that's fine. 05:03:12 But, you shouldn't need to NAT (or even rdr) anything if the WG server is accepting the connections directly. 05:03:33 In your example, is 192.168.0.15 the server running both PF and WG? 05:05:13 no that's the wg client 05:06:31 Ah, that may be your problem then. You're going to want something more like "from any to any" for clients that are already connected. 192.168.0.15 won't necessarily be the only limitation from the server once the client is connected. 05:06:52 PF will still need to be able to talk to the client on the public IP address. 05:07:10 huh? sorry didn't follow that 05:08:18 pass in quick proto tcp to port 2200 05:08:26 pass in quick proto udp to port 6000 05:09:08 pass out quick proto all from $WG to $WAN 05:09:13 pass out quick all 05:10:17 Basically opening up the server firewall to allow connections on TCP 2200 (for SSH) and UDP 6000 (for WG.) 05:10:37 Then, allow $WG to $WAN interface. 05:10:43 is $WG an ip or if? 05:10:43 And then pass out all requests. 05:10:58 $WG is an interface. So is $WAN. 05:11:08 ok i'll try those tyvm 05:13:24 demido: That's only a simple example to work with what you already have. But, you should keep it as simple as you can. Have you seen this?: https://forums.freebsd.org/threads/wireguard-setup-with-pf-problems.72623/ 05:13:45 Good examples of how simple it really should be (with variables, which I would suggest.) 05:14:01 see that's using nat but you said not not needed? 05:16:16 That's outbound NAT, though. Which may be needed between the wireguard interface to WAN. But, otherwise, that should be it. 05:16:39 Basically, just allowing the WG LAN to talk to the WAN and pass it through. 05:17:04 but isn't that just what i was using nat for? 05:17:11 to let wg lan out to wan and out to inet 05:17:15 If this WG server isn't listening on a public interface, you don't even need the "pass in" rules. Just leave everything open (or work your up to only opening what you need.) 05:18:13 demido: Yes. But, you were listing a single IP and not utilizing the interface:network. 05:18:52 Again, the WG server will still need to talk to the IP making the connection via UDP. Not just the WG client LAN IP. 05:19:01 Unless, that's not the problem? 05:19:38 i think i'm too tired to think and i don't wanna waste your time. i crash now and we pick it up tomorrow when i can do better? 05:19:56 If public IP of client is 1.2.3.4 and WG client assigned IP is 192.168.0.15, it'll still need to be able to talk to both. 05:20:22 Not just 192.168.0.15. 05:20:27 Yes. You can go whenever you want. :) 05:20:47 ok i saved your messages tho i'll read when i wake up. tyvm and sorry hehe 05:21:01 Nothing to be sorry about. Have a great rest! 05:22:41 g'nite 09:04:14 hi folks. I'm writing some jail customizations to be applied  to any new jail I build; things like `sysrc sshd_enable=yes` and install packages. I currently run these by copying them to the jail's /tmp and running with jexec. Is there a better way? Specifically, is there a way to run through jexec a script saved on the host system without 09:04:14 copyiing? 09:05:04 I want tobe able to do a `jexev [command]` where the command is on the host system but not inside the jail. 09:15:18 gh00p: not directly. in general the thing that runs in the jail needs to be in the jail, at least via jexec. 09:15:54 gh00p: what you *can* do though, is write a script (e.g. flua) that runs as root, then jails *itself* into the target jail, and runs itself from memory. 09:16:40 once your script/command/tool enters the jail, it loses access to any filesystem stuff outside the jail 09:20:45 so you need to load/import/require all your dependencies prior to jailing 09:44:27 im trying to set zfs arc max and i can't figure out why it's being rejected as invalid argument. in /etc/sysctl.conf i have a line vfs.zfs.arc.max=2147483648 09:44:52 if i run sysctl vfs.zfs.arc.max i can see it's a valid oid, and that value seems right (2GB in bytes) so wtf? 09:50:01 gh00p: I might have misunderstood you. but you are able to run commands from the host, like sysrc -j Jail_name or pkg -j jail_name and so on. 10:01:09 ok i figured it out. in 14.1 i can set vfs zfs arc max even if vfs zfs arc min is 0. but in 14.2 i have to set min > 0 in order to set max. pretty breaking change to put in a point release imo 10:43:01 demido: I'm pretty sure it's vfs.zfs.arc_max - not vfs.zfs.arc.max 10:43:14 demido: And also yes, it needs to be bigger than arc_min 10:44:13 Or am I mistaken? 10:44:41 I have both arc.max and arc_max 10:46:22 And they have the same value. If I change one, the other follows. 10:47:29 Also, the corresponding "min" ctls are set to 0, this doesn't prevent me from setting max 11:01:17 Yeah.. Any max value will of course be greater than 0. So it will allow to set the value. 11:18:52 i will need some help with getting my freebsd back in shape 11:19:06 mainly i need ot fix rc.conf 11:19:38 and i want to start uing ezjail after i had non-ez jails installed 12:15:34 when will 15.0 release engineering start? 12:26:00 anyone get g_dev_taste failed to g_attach error=6? 12:26:20 ivy: https://www.freebsd.org/releng/ mentions a december 2025 release schedule, so probably a few months prior to that? 12:26:47 if you were asking for a more specific answer than that, i dunno sorry 12:27:14 dstolfa: no worries :-) yeah i saw the planned release date 12:27:32 just curious really (mostly so i can start tracking it once it's available, but i guess it'll show up in git) 12:27:54 yeah, i think colin makes sure to send emails out so that as many people as possible test it 12:28:00 so it'll probably be loud enough :P 12:29:03 running current has been exciting but i think i could do with a bit less excitement, so i'll probably switch to stable 12:36:16 I keeping thinking about a pf reference to an interface.. One reference means the interface, another references means any IP address on that interce... something like that. I keep thinking $ext versus but can't remember what it is/does. ... there I found it: "The name of a network interface or group in parentheses ( ). This tells PF to update the rule if the IP address(es) on the named interface change. This is useful on an interface that gets its IP address 12:36:17 via DHCP or dial-up as the ruleset doesn't have to be reloaded each time the address changes." 12:37:27 dvl: $ext is a variable, so you would have to say ext="cxl0" or whatever at the top of the file. a variable can be anything, it doesn't need to be an interface. is a table, not an interface, which is defined with the 'table' statement and contains a list of IP addresses (pre-defined or updated using pfctl) 12:37:51 ivy: thank you 12:38:26 this reminds me that i've recently been annoyed that the 'self' keyword doesn't update when IP addresses change, i should probably report that as a bug 12:38:37 ivy: Please. :) 12:38:49 particularly as it can be a security issue if you're doing something like 'block in from any to self'... 12:40:08 ah... https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=146832 suggests that (self) is supposed to do this 12:40:38 however the bug is that it doesn't actually work :-) 13:17:56 just noticed pkg is now 2.0. what's the occasion? :) 13:33:03 phryk, a bigger number? 13:37:12 CrtxReavr: i'm assuming semantic versioning, which indicates a bigger, incompatible change. :P 13:38:29 not sure if libpkg is actually part of pkg or versioned as its own project, but maybe the api got nicer for people wanting to interface with it programmatically. at least, that'd be my hope. :P 13:39:48 phryk: https://github.com/freebsd/pkg/releases/tag/2.0.0 13:40:03 ivy: aye, that's what i just found. :) 13:40:37 the pkgbase library support is quite nice 13:41:07 that was base and kernel as packages (i.e. debian-like os updates), right? 13:41:33 yes, supposed to become the default installation method for 15.0 13:41:41 I just hope they did it smartly and didn't change syntax for pre-existing functionality. 13:42:06 i'm not sure i like that yet. always liked the strict seperation of base/kernel from the rest of the system. guarantees that no matter how fucked my packages are, the base OS remains working. 13:42:49 you can continue to build from source if you want that, but no one wants to maintain freebsd-update anymore so another method was needed 13:43:05 this feels like it would open the doors for weird dependencies in base and packages that litter outside of /usr/local/. maybe i'm just paranoid, but the voices in my head are usually right in the long run. :P 13:43:09 also, i think freebsd-update bugs broke a lot more systems than pkg ever did :-) 13:44:09 mhh, that will complicate my thinjail setup tho. 13:44:18 I think the biggest part of that separation was different prefixes for boot/fileysystem/network, ie., /, broader OS tools in /usr, and, pkg/ports managed stuff in /usr/local/ 13:44:34 Linux never figured that out. 13:44:40 i have a custom ezjails like thing with a shared base system which isn't rw on any jail, so updating that through pkg might be complicated. 13:44:49 "We'll just toss everything in /usr/! YOLO!" 13:45:08 phryk: pkg -r / pkg -j? that works the same way as how you were using freebsd-update, probably 13:46:23 ivy: the shared base system isn't a jail, so -j won't work unless i set up yet another special jail only used for managing the shared base and skeleton. 13:46:42 ok, so pkg -r 13:47:00 oh, i thought -r was to select a pkg repo. 13:47:11 yeah, that sounds like it might work. :) 13:47:38 fwiw, pkgbase is really nice for building small jails as you don't need to install 100s of MB of crap you don't want in every jail 13:48:14 if it does that already eliminates one footgun. for freebsd-update you have to pass -b *and* -d otherwise you can get conflicting update metadata when you try to update host and thinjail base in one go. 13:49:06 well, i have just base and kernel split up over the shared base that gets nullfs-ro mounted and a "skeleton" which is the basis of new jails for their rw parts. 13:49:26 this is about as minimal as things get, i think. 13:50:36 maybe more relevant is whether i can block pkgbase on the jails because that would explode with attempted writes to the ro mount. 14:42:11 good morning everyone! is there an easy way to list the descriptions of every package in a particular category of the ports tree? 14:45:30 mountainman1312: cd /usr/ports/; for a in *; do echo "$a: "; cat $a/pkg-descr; done 14:46:21 some awk magic in the INDEX file? 14:48:41 like: awk -F\| '$2 ~ /accessibility/ {print $1, $4}' INDEX-14 14:50:43 s/accessibility/ vkarlsen: thanks, that did the trick :) 16:33:31 mountainman1312: i'd just have used pkg query ¯\_(ツ)_/ 16:35:14 i'm getting jail: conduit0: /sbin/ifconfig lo0 127.0.0.1 up: failed 16:35:14 when i try to start a jail created with ezjail, anyone knows what's up? 16:35:19 % pkg query '¯\_(ツ)_/' 16:35:19 Invalid query: query should contain a format string 16:35:21 (: 16:35:35 wsky: 127.0.0.1 is likely already bound to lo0; check ifconfig 16:35:42 might need to give the jail an actual ip 16:36:34 (or 127.0.0.2) 16:37:27 epair11a 16:37:28 14 16:37:28 jail: conduit0: /sbin/ifconfig lo0 127.0.0.2 up: failed 16:38:34 does this interface exist? ifconfig -a 16:38:48 i destroyed it 16:39:01 i ean no 16:39:04 i destroyed lo1 16:40:19 * SKull thinks that using the base jail tools is way simpler and more comfortable than using ezjail and the likes 16:40:43 tbh, I only use ezjail to create the jail, but configure it through /etc/jail.conf, since ezjail didn't support vnet (and maybe still doesn't) 16:41:37 Afterglow: you do know that 'creating' a jails is just having a config in /etc/jail.conf.d/ and then service start jail $jail_name? 16:42:32 since you open up its conf file after creation to edit it, you could just edit it and then start the jail without using ezjail to begin with 16:42:37 SKull, I know, but it's easier for updating/upgrading the jails, and it automagically creates the zfs' 16:43:11 Afterglow: freebsd-update has a -j parameter, so does pkg. even zfs is jail aware. 16:43:18 Afterglow: but whatever works for you 16:43:28 Afterglow: it supports vnet, it always supported vnet, but it's not docummented 16:44:20 Afterglow: i used iocage in the beginning, thinking that it was easier. and it was. until i removed a jail that other jails apparently depended upon. 16:44:52 ok i've managed to make it run 16:50:04 wsky: replace line 'export jail_fastnetmon_ip="..."' with 'export jail_JAILNAME_vnet_interface="epairNUMBERb"' and you will be able to run it from ezjail 16:50:33 s/'export jail_fastnetmon_ip="..."''export jail_JAILNAME_ip="..."' 16:52:14 to make epair devices reusable after jail shutdown you have also to change shutdown script for ezjail to '"export jail_JAILNAME_exec_stop="/bin/sh /etc/rc.shutdown jail"' 16:53:01 VNET jails work under ezjail just fine 16:54:07 I don't know where is the upstream of the ezjail project hosted, if it ever exists, it will be nice to fix a few things with ezjail 17:17:22 good night 17:56:38 jbo: not too bad, just busy as shit. you? 17:58:51 kevans, same here 20:59:18 drobban: thanks, I know about the -f options for various tools, but those run on the host and there are a few things without -f. My hope is to have as few things as possibly have to run outside the jail itself. 20:59:52 dch: my hope was there might be a way to say, load a shell script into the interpreter, drop into the jail, then run the script. Like maybe `sudo sh -j foo /path/outside.sh` though that's just dreaming I guess. 21:02:46 drobban: sorry, I meant -j or course 21:52:31 i know it's freebsd related too somehow, but i am trying to get it to work for pfsense.. http://pastie.org/p/3hMR3EUYBB4ypqbmxG8dHp <-- this works fine for ZFS but i rather have UFS now.. how can i change it? any installerconfig experts here? 21:52:40 i tried search solutions, it's very very hard to find 23:40:34 anyone get g_dev_taste failed to g_attach error=6 in console?