01:26:08 jperkin: is it this one? https://tailscale.com/ 06:43:08 jperkin: Thanks for the advice, I have installed tailscale/wireguard-go/wireguard-tools in a zone, but can’t find example to config and use it 06:43:35 is there any docs or examples, a big thanks 11:31:26 jperkin: I find the latest version is 1.44, should it be upgrade for pkgsrc? thanks 11:34:21 tozhu: yes, though the current version should work fine - nahamu can probably provide an example config 11:37:19 jperkin: thanks, do you know where had the example configuration of wireguard on illumos/smartos ? or tailscale? I have installed tailscale, wireguard-go, wireguard-tools in a native zones, but have not found configuration example, I want to replace wireguare for my OpenBSD box which is running on Bhyve in SmartOS 11:37:32 a big thanks 12:24:14 tozhu: do you want to use tailscale or just wireguard-go? 12:24:50 If you have a tailscale account set up already, tailscale is almost disturbingly simple 12:25:29 pkgin in tailscale; svcadm enable tailscale; tailscale up 12:25:40 or at least that's pretty much how it should be. 12:26:29 and yes, the pkgsrc package needs an update (I've already done the rebase and tag, jperkin) but the current package should be fine to get started. 12:27:04 tozhu: feel free to ping me if you have additional questions. 12:27:44 I'm overdue to write a blog post on how to use the packaged versions on OmniOS and SmartOS. 13:02:01 nahamu : you can even set up your own headscale server (but in a hvm instance only) 13:02:32 https://github.com/juanfont/headscale 13:02:35 also true. 13:05:56 nahamu: a big thanks for the answer, I’m going to run wireguard-go in smartos zones; I don’t have tailscale account 13:06:44 tozhu: ah, I'm less of an expert on the wireguard configurations. 13:07:21 did you use wg-quick on the openbsd machine? 13:07:34 nahamu: thank you for the help, I’m going to regist a account for tailscale 13:07:45 I ported wg-quick to illumos so you should be able to port the config if so. 13:08:09 wireguard configuration is very simple 13:08:29 sure, thank you very much 13:09:21 if you want to remove any keys from the config and gist it somewhere, I can take a look and see how much work is needed. 13:10:19 https://github.com/nshalman/wireguard-tools/tree/wg-quick-for-sunos/contrib/smf 13:11:27 I think the package includes the wg-quick smf service so you should be able to create /etc/wireguard/mywg.conf and then `svcadm enable wg-quick:mywg` 13:11:50 (I really really need to consolidate the documentation, sigh.) 13:14:14 you use https://github.com/TritonDataCenter/smfgen ... to generate that ? 13:15:03 nahamu, a big thank, I’ll try it 13:19:39 nahamu: there is /opt/local/lib/svc/manifest/wireguard-tools.xml in the zone after install wireguard-tools-1.0.20210914 , is it the correct file to configure wireguard services ? 13:20:11 but there is nothing when run command: svcs -a |grep -i wireguard 15:06:39 nahamu: jperkin: would you please help to take a look what’s the issue so that can’t import the SMF https://pastebin.com/75cPH3Tm I installed wireguard-go-0.0.20220316 and wireguard-tools-1.0.20210914 from pkgin/pkgsrc, but can’t import the services 15:08:58 and here is my tun0.conf file for wireguard configuration for reference https://pastebin.com/wFMr1KJ1 15:14:56 tozhu: in a little bit. $work is currently grabbing my attention :) 15:18:04 okay, got it :) 15:30:13 tozhu: which zone image are you using? 15:30:54 image uuid: e44ed3e0-910b-11ed-a5d4-00151714048c 15:31:17 base-64-lts 22.4.0 15:31:39 yep, spinning up a test zone now. 15:40:16 the SMF should have been imported in a disabled state during install, sorry I can't take a look, I need to leave in a minute for a weekend away 15:40:47 if you still have the install output from pkgin it may have clues 15:41:19 just 2 commands: 15:41:21 svccfg -s wireguard-tools add tun0 15:41:26 jperkin: Thank you, and have nice weekend 15:41:29 svcadm enable wireguard-tools:tun 15:41:36 tozhu: those are the 2 commands you need to run 15:42:05 the actual tun device might be a different number; you can name that e.g. tunnel.cfg and use "tunnel" instead of "tun0" 15:42:11 after import it? 15:42:39 thank you, I’ll do a test 15:42:43 uh, I thought it was already imported... let me test again. 15:43:11 but yes, you could import the manifest if it's not imported. 15:43:24 jperkin: have a great weekend! 15:50:00 tozhu: did you get it to work? 15:51:22 nahamu: I have imported, but the state leaves maintenance 15:51:47 after command ‘svcadm enable wireguard-tools’ 15:52:09 tozhu: svcadm clear wireguard-tools 15:52:27 and network interface tun0 is up , but leave 0.0.0.0/0 15:53:19 hmm 15:53:22 still leave the state ‘maintenance’ after ‘svcadm clear wireguard-tools’ command 15:53:43 thanks, first time attempting a 100k ultra marathon, insert straight-face erk smiley here - ping me on Monday nahamu and I'll update the packages to latest versions 15:54:00 jperkin: Good luck! 15:54:09 please don't die! :-) 15:54:10 and there is /etc/wireguard/tun0.conf 15:54:21 first let's rename that from tun0.conf to tunnel.conf 15:54:48 wg-quick will automatically detect the tun device number when it gets created. 15:57:43 nahamu: I have rename tun0.conf to tunnel.conf, then killed wireguard-go, and run ‘svcadm clear wireguard-tools’ 15:58:25 but there is no new file generated in /etc/wireguard dir, and also there is no tunX interface by ifconfig command 15:58:37 "svccfg -s wireguard-tools delete tun0" 15:58:40 just to be safe 15:58:53 okay, thank you 16:00:17 on my machine wg-quick doesn't like the keys from your example. 16:02:50 nahamu: have run ‘svccfg -s wireguard-tools delete tun0’ command, and then re-run the command ‘svccfg -s wireguard-tools add tun0’ to import it, but leave the same status 16:03:25 don't add a tun0 16:03:45 if the file is named "tunnel.conf" add "tunnel" 16:04:45 okay, I’ll re-run 16:06:54 then you can see the errors with: 16:07:06 cat `svcs -L wireguard-tools:tunnel` 16:07:20 When I put in new keys, it works for me. 16:13:00 nahamu: here is my command log and screen dump https://pastebin.com/i7VnWbHk would you please show me your configuration in /etc/wireguard/XXX.conf ? 16:13:19 yup, one moment. 16:13:55 and this zone is a local zone, it is not a global zone 16:14:04 you might have a dangling wireguard-go process you should kill. 16:14:10 pkill wireguard-go 16:19:33 need a few more minutes. 16:30:02 tozhu: can you create a fresh zone and try out this script? https://gist.github.com/nshalman/25a7adb26d29a67e98bb03b4f72f9913 16:30:36 If that works, you should be able to adapt the resulting config file to work for you. 16:31:28 nahamu: Thank you very much 16:31:33 Thank you 16:31:50 My wg-quick might be messing up with /32 at the end of IP addresses in certain places. 16:33:03 okay, thanks again for the great help 16:33:50 please let me know in the end what you had to do to get it working. 16:44:24 sure, I’ll test it in this weekend, and then feedback to you the status, thanks again 16:44:35 sounds good. good luck tozhu!