/srv/irclogs.ubuntu.com/2017/11/28/#ubuntu-server.txt

keithzgHmm, the "Ubuntu Customization Kit" seems to be dead, what's the easiest way to spin up a live image with customized packages? (Need the latest kernel on a live USB session to fix a BTRFS array on a server)00:04
keithzgWait, I stand corrected, it's just the Ubuntu apps directory that an old forum post pointed me to for the uck doesn't go past 13.10, it does still appear to be in the repos00:05
drabkeithzg: it didn't really work for me, but you're welcome to give it a go, maybe something in my setup00:06
drabkeithzg: ended up spending about 12hrs over two days trying to find something that didn't require a ton of sweat and blood end eventually landed on this:00:06
drabhttps://launchpad.net/cubic00:06
drabkeithzg: if you're willing to trust that ppa, the tool works and actually does so rather well00:07
keithzgdrab: I shall take your recommendation and try that first :)00:07
drabthe idea is really exactly the same, extract the iso, unsquash the squash root, chroot, install stuff, repackage00:07
drabI've looked at enough of those things I basically just do it myself manually at this point...00:08
keithzgHeh fair enough00:08
keithzgYeah, I figured it wouldn't be *too* hard to do manually but I was sure there'd be some easy, automated way out there00:08
drabkeithzg: lemme know how it goes, tbh I foudn this by accident almost, apart from uck not much is really advertised00:09
drabnot quite sure why, maybe customizing isos isn't a common thing to do anymore00:10
keithzgYeah, I mean to be fair folks' internet connections tend to be fast enough these days that just installing something and *then* customizing things tends to be the easy solution.00:11
keithzgIn my case though I want it to just immediately boot with the 4.14 kernel since only then do I have a chance at replacing the dead drive in a Btrfs array!00:11
drabI hear you, I ended up making myself a custom pxe image for that00:12
drabcuz I didn't want to have to go around with usb keys or CDs and stuff00:12
draband that was even worse, there's no single small pxe bootable rescue system based on ubuntu for some reason00:12
drabclosest was the old dsl, but it's abandoned00:13
drabkeithzg: oh, the other tool I found that looked nice was this: https://sourceforge.net/projects/pinguy-os/files/ISO_Builder/00:13
drabseems a fork of remastersys00:13
drabupdated last year and reported to work on xenial00:13
drabkeithzg: https://www.ostechnix.com/pinguy-builder-build-custom-ubuntu-os/00:14
keithzgdrab: Hmm the more I think of it the more tempting it is to just unsqash, chroot, and resquash, heh00:14
keithzgI do have a PXE server running at work after all00:14
keithzgCan't remember now if I got UEFI live instances to work or not though00:15
drabkeithzg: fwiw, these were my rough notes from the first pass... cleaned it up since then but been lazy and not republished00:28
drabkeithzg: https://gist.github.com/spikedrba/057acad8b3bfb0266544347ced8b53d400:28
drabkeithzg: it's now offically called PXERescue ;)00:28
drabit uses ramboot initrd script to load the OS in ram00:28
drabkeithzg: the bug I haven't fixed is dns resolution in busybox, so the pxe parameter ramboot should actually use the ip, not hostname00:30
drabask for a bit00:30
keithzgHeh well Pinguy-builder is a bust certainly, since it crashes with "Gtk-WARNING **: Unable to locate theme engine in module_path: "adwaita",". Silly Gnome.00:46
sarnoldOH NO NO THEME BETTER CRASH00:46
keithzgheh01:14
keithzgNo go on uck either, I just get a "Building failed" popup eventually and the log says "kdialog: cannot connect to X server :0" "Script cancelled by user"01:15
sarnoldew01:16
keithzgSurely there are official instructions out there somewhere for how the *actual* ISOs all get built? I can't seem to find them for some reason.01:17
sarnoldkeithzg: I've been shown the exact code on launchpad several times and can't ever recall where it is when someone asks. :(01:21
keithzgsarnold: Drat! Yeah I keep finding things like https://wiki.ubuntu.com/DerivativeDistroHowto#Tools_for_building_distro and I'm thinking at this point "I don't want to know about the tools that 'make this easy', I want to know how to do it The Right Way"---the easy ways aren't so easy if they outright don't work!01:24
keithzgMaybe drab's pxe method will end up being the best way, debootstrapping along those lines now.01:25
drabkeithzg: could never found official instructions, asked around in -dev, no joy either02:23
drabkeithzg: if you find them let me know, I agree that that process should be documented somewhere, maybe an internal wiki02:24
drabkeithzg: the pxe method I'm using is the cleanest ime, it's simple, makes a very small and fast image, has no dependencies past lpxelinux/ipxe and fetches over http so no funny nfs server or slow tftp server02:25
drabbtw, about openvpn, found this which is kind of nice: https://github.com/Nyr/openvpn-install/blob/master/openvpn-install.sh02:30
sarnoldwow, looks nice enough. pity it downloads and executes stuff without checking authenticity, but it's otherwise pretty sharp-looking02:35
drabsarnold: lol, now now, so demanding.. you want ppl to actually check what they download, ah!02:52
drabhave some faith man, double rainbows and all of that02:52
sarnoldhahahaha02:53
keithzgdrab: Sadly, the PXE method didn't work for me in the end, although not because it wouldn't, but because the 4.14.2 packages from the Ubuntu Mainline Kernel PPA simply fail to install. So I seemingly could create a bootable PXE image your way, just not with the one thing customized that I actually want!05:04
keithzgI'm kindof surprised to find that there's no Linux distro out there that specializes in always having bleeding-edge kernels (or if there is one, my google-fu is apparently very weak)05:05
cpaelzergood morning06:34
lordievaderGood morning07:05
cpaelzerhi lordievader07:06
lordievaderHey cpaelzer07:07
lordievaderHow are you doing?07:07
cpaelzerok enough :-) and you?07:10
lordievaderDoing okay. Haven't head coffee yet. I suppose this morning has chances of improving 😋07:11
=== Jynxie_ is now known as Jynxie
mojtabaHello, I have installed stunnel, and restarted the service; but it doesn't show up when I type: ps -ef | grep stunnel09:09
peetaur2mojtaba: which ubuntu release?09:10
mojtabapeetaur2: 16.04 LTS09:11
peetaur2so then let's see   systemctl status stunnel09:11
mojtabapeetaur2: inactive (dead)09:12
mojtabaReason: No such file or directory09:12
mojtabapeetaur2: my conf is in /etc/stunnel09:12
peetaur2pastebin https://bpaste.net the whole output... snippets will just waste time09:13
peetaur2if there's no such file, I expect a filename too09:13
mojtabapeetaur2: http://paste.ubuntu.com/26063374/09:13
mojtabapeetaur2: systemctl status stunnel4 gives me http://paste.ubuntu.com/26063379/09:15
peetaur2bleh...silly pastebin has no raw button09:16
peetaur2so it seems not to say which file exactly, but seems to fail to find some SSL related file... maybe a CA cert09:17
mojtabapeetaur2: yes09:17
peetaur2and says [openvpn] on the next line, so maybe there's some openvpn ca cert you are missing09:17
mojtabaI have them inline in the openvpn config file. (ovpn file)09:18
peetaur2is it relative or absolute path? try absolute09:21
mojtabapeetaur2: I have pasted the cert file in the ovpn file.09:22
mojtabapeetaur2: between <ca></ca> tags.09:23
peetaur2ok, then that sounds good, but then why does it want a file? what other file might it expect?09:25
mojtabapeetaur2: I don't know. That should be just the .pem file.09:26
peetaur2did you set a .pem file?09:27
mojtabapeetaur2: cert = stunnel.pem09:29
peetaur2so try absolute path on that one09:29
mojtabaagain failed09:31
mojtabapeetaur2: this one is different09:32
mojtabapeetaur2: http://paste.ubuntu.com/26063469/09:32
peetaur2mojtaba: ok so now it says permission denied...so maybe it's running as one user, like stunnel, and /var/run is owned by root, so it can't write09:33
mojtabapeetaur2: Yes, so what should I do?09:33
peetaur2so my favorite fix for that is to add in the init script (but that's systemd... will have to look that up) that it makes a dir and chowns it to that user, eg. /var/run/stunnel/ and then in the conf, set the pid file like /var/run/stunnel/stunnel.pid09:34
peetaur2and also report it as a bug...the distro should do all that work for you09:34
peetaur2but fix it first...just to verify you know what the problem really is09:34
peetaur2another option is make a blank file /var/run/stunnel.pid and then chown the file (not dir), and then hopefully it can modify the file instead of making a new one09:35
peetaur2systemd also should support making these files and doing that for you, but this error likely means the service is expected to do that part (which is normal for some...like apache requires that it does that work for itself, runs as root and drops privs)09:36
peetaur2and another option is run as root, and drop privs09:36
peetaur2the lazy insecure way is to only run as root.. you could also test that, but I don't recommend it (and running it that way can leave a mess of files behind owned by root, so you have to chown or rm them to clean up)09:36
mojtabaI think running as root and drop privs is better, what do you think?09:37
mojtabaHow should I report this bug?09:38
peetaur2sure but the program has to support it... you have to see what's possible09:38
peetaur2first find a way to make it work, so you verify your assumptions09:38
mojtabapeetaur2: I see. Ok09:38
mojtabaI will try your second option09:38
peetaur2and then just report it the usual way.... paste the error, and say what it ought to do, and show the fix that works, and that afterwards the daemon runs as the correct user09:38
peetaur2one assumption to check is the service file... does it say like we expect  User=stunnel  rather than run as root and drop privs09:40
mojtabapeetaur2: There was stunnel4 directory in /var/run.09:43
mojtabaI just added that part in the config file.09:43
mojtabaSo instead of pid = /var/run/stunnel.pid, it should be /var/run/stunnel4/stunnel.pid09:44
mojtabapeetaur2: Thanks for your help09:44
peetaur2ah good, and who made the error in the config, you or the distro?09:46
mojtabapeetaur2: The distro.09:48
mojtabaIt was supposed to be like that, based on the doc.09:48
peetaur2so if the distro shipped a conf (that wasn't commented out or in the readme) that doens't work, you could still report it09:49
peetaur2pid file path is not really an admin's job to set... so probably their fault09:49
cpaelzerthe default is actually /var/run/stunnel4.pid at least in the most recent version09:51
cpaelzer... checking xenial09:51
cpaelzeryeah in xenial as well09:52
mojtabacpaelzer: I checked with that too09:53
cpaelzerjust started it with that - works fine09:53
cpaelzerlet me read all your backlog here09:53
peetaur2mojtaba: and btw, you shouldn't need absolute path...just path relative to something; normally openvpn is relative to the conf file, but maybe that's controlled by the init (like maybe it does cd /somedir/; openvpn thatfile.conf, so it's really relative to the cwd, not the conf); so you could figure out what it's doing and set it relative if you want to09:55
peetaur2like in my conf I usually have a keys dir (that has stricter permissions), so the conf says   whatever=keys/blah.pem09:55
cpaelzermojtaba: hmm - if you end up reporting a bug please make sure to describe the steps to trigger the actual issue as it seems to just work (in the basic setup)09:57
cpaelzerso the non-basic part of your setup is important to the bug report09:57
peetaur2yeah, if they can't reproduce it, they might not bother trying to fix it09:58
mojtabapeetaur2: cpaelzer: sure. and thanks for your help09:58
peetaur2like this bug of mine which they just ignore https://bugs.launchpad.net/ubuntu/+source/linux-lts-xenial/+bug/172417309:58
ubottuLaunchpad bug 1724173 in linux-lts-xenial (Ubuntu) "bcache makes the whole io system hang after long run time" [Undecided,New]09:58
peetaur2best I could reproduce was a "Kernel panic - not syncing: stack-protector: Kernel stack is corrupted"  which is not my original issue09:59
peetaur2and maybe if they fixed that, my test script would cause the original issue09:59
mojtabapeetaur2: cpaelzer: It doesn't work with stunnel4.pid in the config file, also it doesn't work with relative path to certificate.10:15
cpaelzerso after all a different issue10:16
cpaelzer?10:16
mojtabacpaelzer: No, I just tried those to see if they work or not.10:17
cpaelzerok, thanks10:17
mojtabaI am now using openvpn with stunnel. But still no luck. I am in China, and I cann't open sites like youtube.com10:17
mojtabaDo you know any other way to work around this?10:18
cpaelzerpeetaur2: FYI I slightly fixed your repro script in the bug and let it run10:36
cpaelzerwith some luck I can make it confirmed and thereby bump it a bit10:36
peetaur2cpaelzer: thanks a bunch :)10:38
peetaur2cpaelzer: I found it crashed easily with a slow hdd cached on RAM, but never crashed with ram backing and hdd cache.... so not sure if ram + ram works too10:39
cpaelzerhrm10:40
peetaur2and also tested hdd and hdd I think, also no crash. Maybe it's an shm bug, and not even bcache ;)10:40
cpaelzerwell you could state so in the bug and modify it slightly to base the "slow" dev on a local image file instead of shm10:41
peetaur2and I'll run it with ram+ram too10:41
peetaur2cpaelzer: how long do you plan to run it? for me, it sometimes crashed within 30 min, but other times took a few hours, but never a day10:43
cpaelzerdepends on how soon the consumed cpu annoys me10:45
cpaelzerhours at least I think10:45
cpaelzerpeetaur2: I added a modified version which sets up the disk on an image on the base disk10:47
cpaelzerthat should be slow enough10:47
cpaelzerrunning with ~100-150k changes per sec according to /sys/block/bcache0/bcache/...10:48
cpaelzerwill let you know in a few hours if it triggered10:48
mojtabaHello, I am using stunnel and openvpn, (I am in China), but still I cannot open websites like youtube.com Does anybody know what should I do?11:10
peetaur2mojtaba: find out why... does dns fail?11:12
mojtabapeetaur2: How can I check it?11:12
peetaur2do a dns query, like with dig11:14
peetaur2if it returns the great firewall of china's "you have been caught, and goons have been dispatched to your location" page, then it fails11:14
mojtabapeetaur2: What should I run exactly?11:15
peetaur2just like   dig youtube.com11:15
mojtabaI ran stunnel in my server, and I am seeing: Error binding service [openvpn] to 0.0.0.0:44311:20
mojtababind: Permission denied (13)11:20
mojtabapeetaur2:11:20
peetaur2the port 443 can't be bound to by a non-privileged user... it has to be 1024 or higher11:26
mojtabapeetaur2: I want to show it as https11:27
mojtabapeetaur2: Do you know what should I do?11:27
peetaur2run as root, or redirect as root11:29
peetaur2or chnage the sysctl that sets which ports are privileged...which I think is net.ipv4.ip_unprivileged_port_start11:30
peetaur2or maybe there's a cap for that11:30
mojtabapeetaur2: I think I am running stunnel as root in server. How can I make sure?11:32
peetaur2if it's still running, ps -ef | grep stunnel11:34
ahasenackrbasak: when you have a moment, I'm seeing something weird with the branch being proposed here: https://code.launchpad.net/~orion-cora/ubuntu/+source/sssd/+git/sssd/+merge/33431711:34
ahasenackrbasak: there is his commit, orion-cora/xenial-sssd-hbac-rule-1722936 (4241de79bb78020f01c1a99017ef217173900101)11:35
ahasenackrbasak: then there is 42a95c2755c71846672a040fa3deda768b323442 which corresponds to an import of patches-unapplied of 1.13.4-1ubuntu1.911:35
ahasenackrbasak: and 44f6b9dc1a1c2befd83ab9c114185993d5fc5579 which is pkg/upload/1.13.4-1ubuntu1.911:35
ahasenackfor some reason, the lintian thinks there are two changelog entries: one for 1.10 (his commit) and one for 1.9, but that is already there and wasn't added in his branch11:36
ahasenackwas this that race we keep talking about, between upload tag and dput?11:36
mojtabapeetaur2: It is running by stunnel4 user, in a chroot11:37
mojtabapeetaur2: This is my stunnel.conf in my server: http://paste.debian.net/997971/11:37
rbasakahasenack, cpaelzer: beta updated to master. I'm running a bind9 import now.11:45
ahasenackok11:47
cpaelzerthanks rbasak12:07
cpaelzerpeetaur2: it won't die in the last hour and I need my cpu back :-)12:11
cpaelzerpeetaur2: I hope the fixups and clarification will help to be looked at by the kernel Team12:12
cpaelzerahasenack: did you want to review the sssd MP yourself and just wanted an extra review slot?12:14
ahasenackcpaelzer: I mainly wanted it to be visible in our review queue12:14
ahasenackcpaelzer: but linter is complaining12:15
cpaelzercomplaining for a bug in git ubuntu, or imperfect MP?12:16
cpaelzermaybe the missing pushed tags we spotted last week12:16
peetaur2cpaelzer: thanks so far, for taking a look :)12:17
peetaur2it'd be so nice if my ceph nodes didn't die every month or two12:17
cpaelzerreasonable wish12:18
cpaelzerjamespage: coreycb: ^^ in case you might have seen ceph+bcache=crash things consider reading the log above about peetaur2's bug12:18
ahasenackcpaelzer: I don't know, that's why I asked12:22
cpaelzerahasenack: ok so you want me to look as well on that?12:24
ahasenackif you have the time, sure12:24
cpaelzerThat is never the right condition, if we wait until I'm bored we wait forever :-)12:25
cpaelzerI'll try to look later on12:25
ahasenacktrue12:25
rbasakahasenack: I think this could be a bug in the lint tool, or the the importer's commit graph, or both.12:56
rbasak(orion-cora's MP)12:56
ahasenackthe lint tool is indeed detecting two changelog entries somehow12:57
rbasakahasenack: though I get "All lint checks passed". What's your cmdline?12:58
ahasenackgit ubuntu lint12:58
rbasakVersion?12:58
ahasenackusing the snap,12:58
ahasenack0.6.2+git44.e7002be12:58
ahasenackalso tried with master just now12:59
ahasenackI patched it to print what versions it found in that check12:59
ahasenackE: must add exactly one changelog entry12:59
ahasenackE: changelog.versions: [Version('1.13.4-1ubuntu1.10'), Version('1.13.4-1ubuntu1.9')]12:59
rbasakCan you find steps to reproduce in a fresh clone please?12:59
rbasakI can't reproduce with a git ubuntu clone, git ubuntu remote add, git checkout and git ubuntu lint.13:00
rbasakOn the same version as you.13:00
ahasenackok13:01
ahasenackrbasak: hmpf, worked after I did rm -rf sssd; clone sssd13:05
ahasenackI wonder if it failed before because I had my own remote, ahasenack, with a bunch of sssd branches, including the Version('1.13.4-1ubuntu1.9')] one13:05
ahasenackoh well13:08
rbasakahasenack: I'm not sure. If you manage to figure out what was different, or the next time you see it, please, let me know.13:10
ahasenackrbasak: fwiw, git log now does NOT show that import patches-applied that I mentioned13:10
ahasenackrbasak: this is what it looked before: http://pastebin.ubuntu.com/26064436/13:11
ahasenackthis is what it looks like now: http://pastebin.ubuntu.com/26064439/13:12
ahasenackok, so it is still there13:12
ahasenackbut now it has tags13:12
ahasenackgit ubuntu lint would barf with http://pastebin.ubuntu.com/26064436/13:12
rbasakahasenack: you didn't have the pkg branch tips either13:13
ahasenackrbasak: like I missed a git fetch pkg? Maybe with --tags?13:14
rbasakMaybe13:15
ahasenackbut I had "Import patches-unapplied version 1.13.4-1ubuntu1.9 to ubuntu/xenial-proposed". The hash is the same. It just didn't have the tags13:15
ahasenackso maybe --tags was missing13:16
ahasenackfrom my fetch13:16
ahasenackgotta remember to add that13:16
rbasakBut what did pkg/ubuntu/xenial-devel point to before?13:16
ahasenackcommit fdff32f77aa7899455f215b9f631ea30f328016e (pkg/ubuntu/xenial-devel, ubuntu/xenial-devel)13:16
ahasenack...13:16
ahasenack    Update ubuntu/xenial-devel from 1.13.4-1ubuntu1.7 to 1.13.4-1ubuntu1.813:16
ahasenackI guess that explains it13:16
ahasenacklint added 1.9 to the list13:17
ahasenackbecause it thought 1.8 was the previous13:18
ahasenackrbasak: is the bind9 (re)import still ongoing?13:44
rbasakahasenack: last I looked, yes. Sorry, it's failed a couple of times due to me (I suspended the laptop it was running from stupidly, and the second time I didn't see it requesting auth and it timed out).13:45
ahasenackok13:46
cpaelzerahasenack: rbasak: here you are :-)13:51
ahasenacktada!13:52
rbasakAargh. It timed out on auth again. I thought I'd given it auth already. This is frustrating :-/13:58
* rbasak files a bug13:58
ahasenackyou mean that bit where you have to open a launchpad link and authorize the app?14:00
cpaelzerrbasak: should I do the import while you are filing?14:01
rbasakI've already tried to rerun it :-/14:03
rbasakcpaelzer: actually, I'll cancel14:03
rbasakDone14:03
rbasakcpaelzer: would you mind? It's more likely to actually land then. I've tried enough times :-/14:04
cpaelzerhehe14:04
cpaelzerok started already14:04
cpaelzerlets see if prompts get less lost on less screens14:04
ahasenackmake sure to approve it for more than 1h :)14:05
cpaelzeractually while it always came back to me due to a bug on the conversion it recently didn't ask anymore14:06
mojtabaHello, I am trying to configure stunnel to communicate over port 443. But when I run netstat -natp | grep :443,  I get the following:14:06
mojtabatcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      20790/stunnel414:07
mojtabatcp        0      0 192.168.2.250:443       5.116.10.151:56716      ESTABLISHED 20790/stunnel414:07
mojtabaAlso I get Error binding service [openvpn] to 0.0.0.0:44314:07
mojtabaDo you know how can I fix this issue?14:07
ahasenackmojtaba: you already have it running and listening on port 443, and even servicing a connection to a client14:07
mojtabaahasenack: What about the error?14:07
rbasakahasenack: I used the old (timed out) link and approved it indefinitely, but seems to have not worked.14:08
ahasenackopenvpn is failing because it's trying to use the same port, 44314:08
ahasenackmojtaba: you can't have to services binding to the same exact socket (0.0.0.0:443 in this casE)14:08
rbasakMaybe the protocol requires the original requesting cookie to complete the auth.14:08
rbasak(rather than completing on web ui approval)14:08
ahasenackrbasak: I think so, if it timed out, that old link is toast14:08
mojtabaahasenack: I didn't configure openvpn to listen to 443!14:09
cpaelzermojtaba: isn't that what you want overall http://blog.deadcode.net/tunneling-openvpn-with-https-to-bypass-censorship-with-stunnel-and-ubuntu/ ?14:09
mojtabacpaelzer: yes14:10
cpaelzermojtaba: I wonder if it would make sense to start over in a container14:11
cpaelzerwith the doc as I linked it14:11
cpaelzerto ensure no old part of the config attemps interfree14:11
cpaelzerinterfere14:11
cpaelzernot sure if there would be any no-no'S n regard to openvon in a container thou14:11
ahasenackthat doc doesn't explain the openvpn bits, though14:12
ahasenackah, later on it does14:12
ahasenacksorry14:12
mojtabaI am not sure, why I am getting that error, as I am not configuring openvpn to listen on 443.14:12
mojtabaAny idea?14:12
ahasenackpaste the openvpn config14:13
ahasenackmaybe you have multiple conf files in /etc/openvpn and it's starting one daemon for each via systemd14:13
cpaelzerahasenack: the import is actually done already since 3 minutes14:13
cpaelzerahasenack: could you check what you get on your end?14:13
ahasenackcpaelzer: checking14:14
mojtabaahasenack: server or client for openvpn?14:15
ahasenackwhere stunnel is running and listening on port 44314:15
mojtabaahasenack: server, ok14:15
mojtabaahasenack: http://paste.debian.net/997988/14:17
ahasenackcpaelzer: looks good now, thanks14:18
ahasenackmojtaba: is that the only config file you have? Do you have something listening on port 1194 right now?14:19
ahasenackcpaelzer: one step further, but merge start crashes (https://bugs.launchpad.net/usd-importer/+bug/1734364 and new comment https://bugs.launchpad.net/usd-importer/+bug/1734364/comments/1)14:21
ubottuLaunchpad bug 1734364 in usd-importer "merge start fails with bind9" [Undecided,New]14:21
ahasenackI thought it could be crashing before because ubuntu/devel was incorrect and I was using ubuntu/bionic14:21
ahasenackok, lunch time :)14:21
mojtabaahasenack: that was for openvpn, config file14:21
mojtabaahasenack: no, just openvpn14:22
Slashmanhello, I have a server on ubuntu17.10, I have changed the config file /etc/netplan/01-netcfg.yaml, how can I reload the config file to apply it ?14:49
peetaur2Slashman: if it's just something read on service start, restart the service.14:51
Slashmanpeetaur2: do you know about netplan? because that is not that simple it seems14:52
Slashmanhttps://wiki.ubuntu.com/Netplan14:52
peetaur2no idea14:52
cpaelzerahasenack: did a check on your issue, and I think I found it - but we need rbasak to give it the code-POV14:53
cpaelzerahasenack: I updated the bug14:53
Slashmanok, the answer is right on the page, did'nt look closely enough14:53
cpaelzerSlashman: thre is an apply/generate to netplan14:54
Slashmancpaelzer: yah, I just noticed that, I didn't saw it on the manpage14:55
rbasakcpaelzer: I think it's all in gitubuntu/merge.py15:02
rbasakI don't remember ever having looked in there.15:02
jamespagecoreycb: think I have gnocchi ready for upload with py3 enabled; had todo one patch15:12
coreycbjamespage: awesome15:13
jamespagecoreycb: yes confirmed - no more mismatch problems, and reports are now showing updates again!15:55
jamespagewoot15:55
coreycbjamespage: yep looks good!15:55
dpb1Howdy all!  office hours is officially starting.  Please bring all questions16:03
cpaelzerthanks for opening that up dpb116:12
dpb1... the canonical server team puts their hands behind their head and their feet up16:43
slashddpb1, lol16:48
dpb1oh, hi slashd, sorry, we weren't napping, just resting our eyelids16:49
slashddpb1, of course ;)16:50
* dpb1 turns around the office hours sign from open to closed. night all!17:02
xpistosHey guys. I could use a hand with something. I am automating a virus scan to send me an alert whenever I get a hit. I am setting the file name using "$(date +%B_%e)_scan_results.log" but I am not sure how to push that into mail using the date command. if it is a static file name I just use mail -s Test EMAIL << FILENAME.LOG it works fine17:08
drabxpistos: assign the date to a variable: $DATE_CUR=$(date+%B_%e) ; and the filename becomes ${DATE_CUR}_scan_results.log17:09
drabeer, DATE_CUR=, no $ there17:10
drabor probably even cleaner FN_NAME="$(date +%B_%e)_scan_results.log" and then mail -s Test EMAIL << $FN_NAME17:11
xpistostells me the body is null17:13
xpistosusing the $FN_NAME version17:14
drabwell I don't know your script, that variable must be available by the time you call the mail command17:15
drabmaybe pastebin your script on dpaste.com17:15
xpistosnot a script, basically just touch "$(date +%B_%e)_scan_results.log" && DATE_CUR="$(date +%B_%e)_scan_results.log" && mail -s Test EMAIL < $DATE_CUR17:16
xpistosI am getting th email just nothing in the body17:16
xpistosand I have tried it with both < and <<17:16
xpistosI will probably make this a script though17:17
dlloydyou can use -a to attach a file17:17
drabwell that's a different problem then, maybe the mail command doesn't work like that, haven't used it in a while, but iirc you echo to it, not sure < works17:17
drabtry this: FN="$(date +%B_%e)_scan_results.log && echo $FN | mail -s Test EMAIL17:18
drabsee if you get the filename in the body17:18
drabapparently mail -s xxx < file is accepted syntax17:19
drabis there anything in your file? touch won't put anything in it, so the email body will obviously be empty17:19
xpistosdrab: I am trying to get the contents of the file in the body not the file name itself17:19
drabif all you're running is the above oneliner there's nothing in your file17:20
xpistosright now it says "Infected=0"17:20
xpistosdrab: that file does anyway17:21
drabok, then you aren't running the above oneliner. it's really a bad practice to tell ppl you're doing something that's not what you're doing and ask for help17:21
drabdoes mail -s Test < whatverfile_with_something_in_it work?17:21
xpistosI am an idiot. It was supposed to have somethign it but I didnt' cause I just touched it17:22
drabit's ok, it happens17:22
drabhttp://www.bash.org/?201579/17:23
draba bash quote for every occasion... :)17:23
xpistosGood. I am not alone!17:23
xpistosdrab: Thanks for the help.17:23
drabyou're welcome17:23
sdezielboy, my productivity just went down the drain, thank for the quotes site ;)17:26
drablike I said, you're welcome :P17:26
drabI got ovpn working in the end inside a container17:32
drabI'm somewhat confused why it works actually, I was expecting the bridge setup to require more work, but it doesn't17:33
drabI suspect it's something to do with the fact it's lxc and those network interfaces are already sitting on top of a bridge17:33
drabif two interfaces aren't bridged, one should not arp for the other's ip, should it?17:38
drabtun0 has its set of ips, which are overlapping with the one on eth0/LAN, but I still don't see how/why the host would respond to arp requests for a vpn client behind tun17:39
maxbI think there are some fairly confusing sysctl values to affect this17:39
sdezieldrab: there is no arp for tun devices, it's layer 3 only17:40
sdezielbut since you are talking about bridge, maybe you meant tap?17:41
drabsdeziel: so, see, that's the thing, I was gonna set it up on server-bridge + tap, but then just for testing I kept the default tun thinking of doing masquerading17:42
drabso it's on tun right now17:42
sdezieltun is the recommended dev type by upstream17:43
sdezielless overhead and generally cleaner17:43
drabright, but then you're supposed to masquerade, no?17:43
drabor you can do server-bridge with tun?17:43
sdezielit really depends for the masquerading17:43
sdezielbridging requires a tap as that's Ethernet bridging17:44
drabright17:44
drabso basically right now everything is working and I don't quite understand why :P , I thought it would not17:46
drabI was expecting to have to add some static routes17:46
drabyeah, I think I figured it out... it's an issue with how I'm testing17:51
drabaltho, uhm, icmp pkts are coming from the vpn ip, so looks like all traffic is being correctly tunneled17:53
HackeMatehi, i want to forward all traffic from eth0 to eth1, shall i use iptables or simply sysctl net.ipv4.ip_forward=1 ?18:26
HackeMatethe goal is firewall that lan18:26
=== jc_ is now known as jc
drabHackeMate: iptables doesn't forward traffic per se, the sysctl setting is what does that19:49
drabto say tho that you want to forward traffic and then to say that you want to firewall that lan is confusing to me tho19:49
drabHackeMate: what are you trying to accomplish?19:49
metastablesysctl for forwarding, iptables for filtering rules, most likely.19:54
HackeMatei want put a minipc between router and lan computers and firewall its connection19:56
HackeMatethe minipc has 2 ethernet, one for the router incoming data and the other one for the computer lan switch19:57
HackeMateis the plan correct?19:57
drabdepends what correct means, what are you trying to achieve?20:00
drabinstall a firewall to protect the LAN?20:00
metastableWhy are you putting a firewall box between the router and the switch?20:02
HackeMateyes, protect the lan20:09
HackeMatei do that because i have to save logs, parse them and show statistics based on those logs20:10
metastableLogs of what? Statistics of what?20:10
metastable"Protect the LAN" from what?20:11
metastablePS: "Hackers" is not an answer.20:11
sarnoldbe verbose in your answer, that may change the tools / approach we recommend :)20:12
metastable^20:12
drabso I was correct, once I stepped out to public wifi I could vpn in, but get nowhere else except the vpn server20:13
HackeMateit is for an educative center, teachers wont allow students use its wifi connection for instagram in example, i said there are many things to reach instagram without opening instagram website, so this is the startpoint20:13
drabI'm glad thing still make sense even if it means it doesn't work :)20:13
metastableHackeMate: A firewall is NOT going to help you with that use case.20:14
metastabledrab: I can help with VPNs.20:14
HackeMatevpn is slower though20:14
metastableHackeMate: The VPN comment wasn't to you.20:14
HackeMateah sorry20:14
HackeMatea firewall is for block those connections to instagram and other social networks20:15
HackeMateor whatever they use for bypass firewall20:16
metastableHackeMate: You will NEVER accomplish that with any kind of real efficiency using iptables.20:16
metastableHackeMate: You are applying the wrong tool, plain and simple.20:16
HackeMatewhat could you use then?20:16
sarnoldI've heard good things about http://e2guardian.org/cms/ but have never used it myself20:17
HackeMatedns proxy?20:17
drabHackeMate: if you can afford it, just get untangle https://www.untangle.com/20:18
metastableHackeMate: What you really need is a web category filter. Untangle is one option, though for non-home use it can get pricey.20:18
metastablepfSense and SquidGuard could also work.20:19
drabsarnold: it's the best in class, with redwood being second best (even if just because it's newer). then you have pfsense, but that's not linux anymore20:19
HackeMatepfsense is a router basically, no?20:19
sdezieldrab: if you are assigning your VPN clients IP addresses from say 10.8.0.0/24, you will see this net range when those VPN clients try to reach machines next to the VPN server20:19
metastablepfSense is a lot more than just a router.20:19
metastabledrab: I don't quite care if it's Linux or not. All of this is off-topic here already because it's not Ubuntu.20:20
drabalso pfsense will use e2guardian (optional) or dansguardian (built-in, and pretty meh)20:20
drabsure20:20
sdezieldrab: you have different solutions to make the return packet reach your VPN clients, one of them is adding a static route (back to the VPN server) to the machine you are trying to reach20:20
metastabledrab: pfsense will use squid with whatever blacklists you enable.20:20
drabsdeziel: yeah those are the static routes I thought I'd need to add, trying now20:21
sdezieldrab: the other (less clean) is to SNAT/MASQUERADE what goes out of the VPN server itself. Something like -A POSTROUTING -s 10.8.0.0/24 -o eth+ -j MASQUERADE20:21
sdezieldrab: the SNAT/MASQUERADE trick is so much quicker though :)20:21
drabsdeziel: you might be right20:22
drablemme look into that...20:22
metastableI don't EVER MASQ the stuff coming out of my VPN server. Enable the forwarding sysctl variable, and make sure the router knows how to send traffic to the VPN subnet.20:22
metastableOne static route in the router to the VPN server's LAN IP, done.20:22
drabfair point20:23
metastableIf you're using iptables, make sure that the FORWARD policy is ALLOW, or add a rule to that effect.20:24
drabI'm gonna try with static routes first, I think that's what I did a long time ago and it worked and saves me from having to think about the FW stuff20:24
metastabledrab: I can set up just about any VPN from memory, so if you want to dig into this, I'm game.20:24
drabmetastable: appreciate it, I like to do my homework before asking so lemme poke at it and if in bit I got nowhere I'll come and bug you20:25
metastabledrab: Oh, I won't do it for you. Trust me, you'll learn plenty.20:25
HackeMatesquidguard is a plugin for squid, squid is  a proxy, users can bypass the proxy settings, no? thats why i think about using a firewall, how can i force to use proxy, putting it as gateway?20:25
metastableHackeMate: Transparent proxies can't be bypassed by the means you're thinking of. They intercept ALL web requests, and require no configuration on the client system.20:26
drabsarnold: if the code was good, it looks promising: https://github.com/andybalholm/redwood20:26
HackeMateah20:26
drabsarnold: somebody was trying to build debs a while back20:26
drabalso e2g is being rewritten and 5 will be coming out soon with a completely diff design, including transparent ssl proxying, right now it only works in explicit mode20:27
sarnolddrab: well, it's in go, so at least it's unlikely to have buffer overflows and use-after-frees and so on :) hehe20:27
metastabledrab: Which will still suck unless you have an easy method of deploying the proxy's CA cert to the clients.20:27
sdezieldrab: metastable: the static route added to the router is the best way but require there is no more direct way between the servers and the VPN otherwise you will see some ICMP redirects20:27
drabmetastable: tell me about it, was about 3 weeks of nightmares20:28
drabfiguring out how firefox, chrome etc read the CA list20:28
drabwhich they all do differently20:28
metastablesdeziel: If you're entering the route in the correct place and your routing structure isn't a garbage fire, that shouldn't happen.20:28
sdezielmetastable: I don't want to assume anything about the network topology that drab's dealing with :)20:29
metastablesdeziel: Also correct. :P20:29
metastableAnd a very fair point.20:29
metastableI have worked in places where the routing structures were garbage fires, alas.20:29
sdezielsome put their VPN servers in their DMZ which makes it annoying when connecting to those other machines in the DMZ for example20:30
drabtopology is pretty simple: one flat lan, one of the hosts on the lan has ovpn set up on it, gw/fw has a portforward to it. ovpn host has its own eth0 on the lan and a tun0 on the vpn network (diff than the lan network)20:30
sdezieldrab: so yeah, you'll have ICMP redirects :)20:31
metastableStatic route will be your best bet, there.20:31
metastableUhh. What?20:31
metastableHow will you have ICMP redirects?20:31
metastableI feel like I'm missing a part of the conversation.20:32
Epx998Is it possible to rename a network interface via early command or something in the preseed?20:32
sdezielmetastable: all the LAN machines have a default GW as their only route20:33
metastablesdeziel: Yyyyyeah, and? VPN traffic hands traffic for a different subnet off to the router, router forwards that traffic to the next hop interface, etc.20:34
sdezielmetastable: so when the VPN server relay traffic for the VPN client range, the LAN machine will send the return packet to the default gw which will send ICMP redirect if it has a static route to the VPN range20:34
metastablesdeziel: I don't think that's right...20:34
sdezielmetastable: try it20:34
metastableWill do.20:35
sdezielthe VPN server, the gw and the LAN machines are all part of LAN so the gw has to tell the LAN machines to not hop through it because there is a shorter path20:35
metastableThat does make sense, actually.20:35
sdeziellet's use some IP ranges to exemplify this20:36
metastableNo, I get it.20:36
HackeMatei like the squidguard option, i just need the ipv4 forwarding for achieve this, right?20:36
sdezielLAN: 192.168.0.0/24, GW: 192.168.0.1, VPN server: 192.168.0.94, serverA: 192.168.0.220:36
metastableI GET IT.20:37
metastable:P20:37
sdezielalright :)20:37
Epx998hmm20:40
drabsdeziel: is there a particular reason you brought up the ICMP redirects? I mean, is it just because of the added noise on the network or what that I should care about them?20:46
sdezieldrab: I heard this mechanism of finding a more optimal path didn't work reliably but I never really ran into a situation with ICMP redirects myself. Maybe it will work well in your environment?20:47
drabI guess I'll find out soon20:49
drabbrb, someone can't print :(20:49
sdezieldrab: most people don't run into this problem because their VPN endpoint is their router20:49
metastableI have a dedicated box running strongSWAN, ocserv, openvpn.20:52
metastablestrongswan is... interesting to configure, to say the least.20:53
sdezielif by interesting you mean hugely fun then yes, I agree20:55
sdezielnever heard of ocserv though20:55
sdezielnvm, openconnect.20:55
metastableIt's the server-side component.20:56
metastableTechnically, openconnect is the client.20:57
metastableI already use the AnyConnect client for work, so it made sense.21:00
coreycbjamespage: I have pike stable point releases queued up via bug 173499021:04
ubottubug 1734990 in nova (Ubuntu Artful) " [SRU] pike stable releases" [Undecided,New] https://launchpad.net/bugs/173499021:04
jogpowersj, I just opened bug https://bugs.launchpad.net/ubuntu/+source/ipxe/+bug/173501523:05
ubottuLaunchpad bug 1735015 in ipxe (Ubuntu) "FTBFS: ipxe on zesty" [Undecided,New]23:05
powersjjog thanks will ping others about it as well23:05

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!