/srv/irclogs.ubuntu.com/2017/08/15/#ubuntu-server.txt

naccrbasak: i think you forgot to commit your tests/changelogs/test_distribution file. Can you do so and push it to master?00:02
=== Hirppa is now known as Guest81339
=== Valfor is now known as Guest45971
=== X-Rob is now known as Guest84163
=== giraffe is now known as Guest83487
=== Guest84163 is now known as X-Rob
drabanybody around that happens to be into voip/asterisk? I'm trying to figure out what to do with the asterisk 11 install we have00:27
cpaelzergood morning04:31
=== Guest69923 is now known as lordievader
lordievaderGood morning05:30
rbasaknacc: sorry! Done.06:14
LaserAllanhey guys, do yu know of any webmail apckage that is updated by apt that can be added?, i have used squirrelmail until it was unsupported and Rainloop isn't handled by any repo so I am looking for a better solution.06:23
=== lifeless_ is now known as lifeless
=== G_ is now known as G
=== edwinksl- is now known as edwinksl
gunixanybody set up galera arbitrator 3 on an ubuntu node?11:52
=== Guest81339 is now known as Hirppa
devster31is there a clever one-liner to dump yaml to json?14:00
devster31ok, this seems to work -> ruby -rjson -ryaml -e 'puts YAML.load($stdin.read).to_json'14:08
devster31with pipes14:08
runelind_qUbuntu server sure likes to push out updates to its kernel14:31
ahasenackrbasak: hi, ping14:43
ahasenackrbasak: http://pastebin.ubuntu.com/25319275/ these 3 entries in d/changelog are related14:43
ahasenackrbasak: would you prefer to see 3 individual commits, or one?14:44
cpaelzerdevster31: also python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)' < file.yaml > file.json14:44
cpaelzeryou surely can find more via search engines14:44
devster31doesn't that require pyyaml or something?14:44
cpaelzeryep14:44
cpaelzerwas installed for me already14:45
ahasenacknacc: are you in yet? What's your opinion wrt my question above?15:00
cpaelzerahasenack: I can tell you what I prefer and usually do in these cases if you want?15:01
ahasenacksure, I just asked them first because they are the uploaders15:01
* cpaelzer feels neglected15:01
cpaelzerahasenack: I'd make one commit each - but with slight adaptions to the commit message to get better changelogs15:02
ahasenackheh, imagine how I feel with MPs up for more than a month :)15:02
cpaelzerOn the first one I make a level 1 entry in this case the use of ldap-auth-config AND in the same commit a level 2 entry what this commit changes in particular15:03
cpaelzerFollowing commits have only level 2 entries as long as they belong to the same thing15:03
cpaelzeron auto generated changelog that auto-groups them which I like to carry the "they belong together" meaning15:03
cpaelzerI thought I reviewed all that made sense to review from me15:04
ahasenackyou did15:04
cpaelzerall others had other reviewers for a reason15:04
cpaelzerI saw your two new merges in the queue but since I started late ...15:04
cpaelzeralso I plan to add a few on my own today/tmrw as time permits15:05
naccahasenack: reading15:10
naccahasenack: it feels like they should be rewritten if they are related (tbh). I don't think it matters much if they are one commit or three, though.15:11
naccahasenack: what matters is each commit accurately describes teh changes in it15:11
ahasenackok15:11
naccahasenack: given that we don't want to accidentally cherry-pick only one of the three, though, it seems reasonable to make them one?15:11
ahasenackit does15:11
ahasenackyou can't really just drop one of the 3, for example15:12
naccahasenack: yep15:14
pankajI am trying to setup ssh connection between my Linux OS and virtual server but during 'ssh-copy-id username@remotehost' I am getting error. Please somebody help.15:17
tsglovepankaj, help us help you.15:22
ahasenacknacc: this one was sponsored already, what do we do with it from an MP perspective? https://code.launchpad.net/~ahasenack/ubuntu/+source/samba/+git/samba/+merge/32607315:23
naccahasenack: i don't recall, i'll leave it for now until we decide what to do with them15:24
ahasenackok15:24
dpb1ahasenack: any open MPs for ubuntu-advantage-tools you need me to look at?  I'm starting with the doc15:24
naccso only 4 to review :)15:24
ahasenackdpb1: no open mp15:24
ahasenackdpb1: we just need to make a release in github, tag, if we are happy with it as is15:25
dpb1ahasenack: can I install onto xenial from that ppa?15:25
ahasenackdpb1: yes15:25
dpb1(and get tip, I mean)15:25
dpb1ok15:25
dpb1I'll do that15:25
ahasenackdpb1: ack had two changes since that build: manpage, and another I forgot15:25
ahasenackmanpage just had a new section about exit status15:26
dpb1oh, it's not a recipe?  I'm shocked15:26
ahasenackcan recipes build from github?15:26
ahasenackwe might have to mirror15:26
dpb1I really don't care15:26
dpb1I'll just build the package here15:26
dpb1n/w15:26
dpb1just giving you a hard time15:26
dpb1ahasenack: and, no landscape yet, right?15:27
ahasenackright15:27
dpb1ahasenack: lint failures!15:29
dpb1shocked15:29
dpb1again15:29
ahasenackwhat did you run?15:29
dpb1dpkg-buildpackage -uc -us15:29
dpb1but, more cheaper... make lint15:29
ahasenackah, I blame ack for that. shellcheck in ubuntu is older than in debian15:29
ahasenackand github installs the debian one15:29
ahasenackwhich is fixed regarding those failures15:30
dpb1should I be on artful for this testing?15:30
ahasenackwon't help you regarding shellcheck15:30
dpb1or it's out of date there too15:30
dpb1ok15:30
ahasenackbut are these run at package build time? Hm15:30
dpb1:/15:31
dpb1yes15:31
ahasenackthen we have to drop that15:31
dpb1I can quickly fix I think15:32
dpb1sec15:32
ahasenackackk: we need to drop shellcheck, it needs to work in plain ubuntu regardless of what we do to make it work in travis15:33
ahasenackah, he is away today15:34
dpb1ahasenack: I'm putting up a branch, it's fine15:34
dannfcpaelzer: should i just open a new bug for this pflash/apparmor issue?15:35
dannfcpaelzer: or maybe discuss via e-mail somewhere? just trying to cleanly separate the issue from the migration one15:36
cpaelzerdannf: yes they are separate issues for sure15:36
cpaelzerdannf: and the one hitting the image files on all arches is fixed15:36
dannfcpaelzer: cool - yeah, just didn't know if you minded a bug for an issue that's not actually in ubunt yet :)15:36
cpaelzerdannf: so a new one would be great15:36
cpaelzerdannf: I fixed the other one (images) already even it is not a bug yet15:37
cpaelzerdannf: for qemu 2.10 prep15:37
cpaelzerdannf: so yeah please, just need dmesg and the xml15:37
cpaelzerad I need to drive virt-aa-helper manually from there and see what rules it creates for the flash files15:37
dannfcpaelzer: will do15:39
cpaelzerdannf: I'm also on the minor one with the s390x packaging - cleaning that up15:39
cpaelzerdannf: yet I think with a different fix than what you suggested15:40
cpaelzerIMHO there is no reason to have s390 being the only different one15:40
cpaelzerso I'd more likely adapt the d/control in a way to match the other architectures15:40
xnoxhmmm15:40
dannfcpaelzer: i was assuming it was the only different one because it didn't have full emulation - e.g. requires hardware acceleration - but i'm not sure about that15:40
* xnox wonders if there is stuff that I did, that made s390x look odd. It should be just like x86_64.15:41
* xnox and e.g. should not be in "ports" bucket15:41
cpaelzerwell ther eis a partial tcg which can be used15:41
cpaelzerso why not15:41
cpaelzerxnox: yeah it was you :-P15:41
dpb1ahasenack: https://github.com/CanonicalLtd/ubuntu-advantage-script/pull/3915:41
cpaelzerbut long enough ago that it doesn't matter15:41
cpaelzerand that is my mindset as well, it should be just like x86, arm, ppc, ...15:42
cpaelzeroO it seems gcc7 also makes qemu compiles unhappy15:42
xnoxcpaelzer, as long as you do not drop qemu-system-s390x i'm fine =)15:42
cpaelzerI'd be the last one to do that15:42
cpaelzerqemu2.10 is good with ggc-7 so overall all fine for artful16:01
cpaelzerwow ggc new compiler, gcc of course16:01
drabcan anybody confirm that ubuntu-server is and will be using timesyncd?17:06
drabit seems that this changed from 14.04 to 16.04, however the same seems to not be true for 16.04 desktop17:07
drabI'm seeing ntpd running on a fresh install of desktop17:07
drabalso I can't see where the default is set and can't tell what timesyncd is actually using17:07
drabthe conf file has the fallback commented out, ntp.ubuntu.com , which if I had to guess I'd imagine is what is used, but I'd like to confirm that17:08
drabyeah, confirmed with tcpdump, it's calling out to alphyn.canonical.com.ntp , guess maybe a patch to set that as deafult in the code17:11
tewarddpb1: ping17:12
dpb1hey teward17:14
tewarddpb1: got your inquiry on the email of the meeting logs - sorry I was in a server room away from my phone17:15
tewardi just got the ping for it - my email parser read it and poked.  I'll be available, to my knowledge today, for the meeting next week if there's a need for me to be backup17:15
tewardif something comes up I'll let you all know.17:15
dpb1teward: no worries at all, just wanted to give you a heads up you are getting close17:15
tewardyep, I checked that myself :)17:16
dpb1heh17:16
dpb1cool17:16
dpb1thanks for getting back17:16
tewardyep17:16
=== Tohuw is now known as Guest68958
Vladimirskiis there an alternative to proxmox on ubuntu-server(by that I mean is supported by ubuntu)?17:46
drabVladimirski: to do the same thing/everything that proxmox does? what I mean is, it could be easier if you were interest in only particular features17:48
drabfor example if you were just doing qemu and weren't interested in a web interface you could use libvirt with virsh/virtmanager17:49
drabor if you were interested in containers with lxd and new lxc command line17:49
Vladimirskidrab: Well I need a virtual environment where I can host different operative systems17:49
drabok, does it have to have a nice to use web interface?17:49
Vladimirskiwell it would be nice to have one17:50
Vladimirskidrab: I was thinking of using KVM, maybe there's a webgui for it17:53
Vladimirskidrab: Actually oVirt maybe is my solution?17:54
drabif you want a bwe based solution the best I know is Ovirt17:54
drabyeah, was typing just that17:54
drabif you're xen oriented, there's xenserver17:54
drabfor kvm, if you have a desktop, libvirt + virtmanager is actually really neat17:55
drabbut I guess it's not as aware of a cluster of libvirt instances and so forth17:55
drabit depends how "cloud" you're trying to go17:55
Vladimirskithanks17:55
Vladimirskigotta think about it17:55
drabif you just want to run a bunch of virtual machines on one or two servers, then imho libvirt + virtmanager is probably the easiest17:55
Vladimirskiit should be to complicated in configuration sense..17:56
Vladimirskialright17:56
drabif you're trying to do something more advanced, then probably ovirt is a better choice if you don't want to run proxmox (which afaik is one of the best solutions out there)17:56
drabbut you have to use their own debian isos, which is one of the reason I ddin't go with it17:56
drabVladimirski: fwiw, I don't know what you're doing, but if you have limited capacity containers may be a better choice than full virtualization17:57
drabI've pretty much migrated all my instances from kvm to lxd minus a few where kernel space stuff matters or I need further isolation at that level17:58
RoyKkvm/libvirt works well alone, but it's not very straight-forward to setup in a multinode setup17:58
drabmost notable example, nfs-kernel-server17:58
drabyeah17:58
drabhence the suggestion for ovirt in that case, more similar to proxmox, but also more work to setup and maintain ime as complexity is higher17:59
drablibvirt + virtmanager is *really* straightforward17:59
drabhttps://help.ubuntu.com/lts/serverguide/NTP.html18:00
drabstuff on this page seems not true... specifically the interaction between timesyncd and ntp18:00
drabanybody familiar with the two?18:00
RoyKexcept for multinode, perhaps, where you'll need corosync and friends, which can be a bit of a hassle18:00
drab"If NTP is installed and replaces the activity of timedatectl the line "NTP synchronized" is set to yes."18:00
RoyKthat is, haven't used it or some time, so it might be easier now18:00
drabbut that doesn't seem to be the case. I removed ntp and timedatectl still says NTP synchronized is true18:01
drabie nothing seems to change18:01
RoyKdrab: just wait a while and time will drift18:01
draband I can't really remove it as it's not its own package (timesyncd I mean)18:01
RoyKntp setup is the easy part18:01
drabyeah it's all done, but the interaction between the two is very opaque18:02
drabI don't see where timesync checks for ntp etc18:02
drabor where you'd "deconfigure" timesyncd18:02
drabso I have no confidence that this is working correctly and timesycnd is backing out leaving ntp to do the job18:02
RoyKsimply installing and configuring ntpd with a local-ish ntp server should do the job down to a very small fraction of a second between the hosts18:03
drabyeah, that's not what I'm concerned about, what looks dubious is the interaction with systemd-timesyncd18:04
drabagain look at the official doc I linked, it says something very specific about the interaction of the two18:06
draband that doesn't hold true in my experiment18:06
hehehehi18:07
heheheif I want to checkout a specific stuff from git but its not  branch but tree18:07
hehehehttps://github.com/opencart/opencart/tree/2.3.0.218:08
hehehehow do I clone that?18:08
hehehe:D18:08
drabit's not a "tree", that's just the web view in github18:09
drabthere is a tag for 2.3.0.2 release, that's what you clone18:09
drabhehehe: https://git-scm.com/docs/git-clone#git-clone--bltnamegt18:10
drabas the man page says you can specify a tag with the branch command18:11
hehehecool18:15
ahasenackcpaelzer: around still?18:17
ahasenack(not urgent)18:17
hehehesolved it18:19
cpaelzerahasenack: here18:20
hehehenext idea - some app where it simulates icecream :) you have to lick a screen at high speed to eat it lol18:20
ahasenackcpaelzer: checking that extra patch in cifs-utils, doing some archeology18:20
ahasenackcpaelzer: I think it's not needed, because18:20
ahasenackcpaelzer: a) http://pastebin.ubuntu.com/25320452/ 6.2 release notes mentions that that binary is now searched using $PATH (I'm trying to find a diff)18:20
cpaelzerthats exactly why I asked, because I often find archeology turns out to be inertesting :-)18:21
ahasenackcpaelzer: b) this is the patch: http://pastebin.ubuntu.com/25320448/18:21
ahasenackc) http://pastebin.ubuntu.com/25320445/ is the code without the patch18:21
ahasenackit seems our check is reduntant, although it would avoid some unecessary calls18:21
nacchrm, that is not the 'canonical' way to check if systemd is running18:21
ahasenackbut also make it less robust if the binary ever moves to another location18:21
hehehenacc: yes so :))18:21
naccchecking for /var/run/systemd is, iirc18:21
ahasenackthe switch to using popen is from 201318:21
ahasenack(in cifs-utils)18:22
ahasenackI searched lp for closed bugs but only found one asking to update cifs-utils18:22
ahasenackwill try a more thorough d/changelog search now18:22
cpaelzerahasenack: well there could be the case of systemd having the paths above and considers it is_systemd_running18:22
cpaelzerahasenack: but lacks the binary18:23
naccahasenack: yeah, i'd file an upstream bug that those checks are sort of wrong18:23
cpaelzerahasenack: I thik that is what the check was meant for18:23
ahasenackwell, nothing is checking that it's running, not even our patch18:23
naccsemantically, they clearly are trying to :)18:23
cpaelzerwhich is a sub-optimal upstream18:23
naccbut they are using the wrong semantics18:23
nacci believe the /var/run/systemd check is what pitti or xnox told me to use18:24
cpaelzerahasenack: well if the popen fails they will end as if the check would have been wrong18:24
cpaelzerso yeah18:24
nacc(for puppet upstream)18:24
cpaelzerdropping our delta would make it even better18:24
cpaelzeras it would work if the path changes18:24
xnoxnacc, but do forget that /var/run exists.18:24
xnoxnacc, only ever use /run/systemd/system check; as /run/systemd exists on systems with pid 1 upstart, and logind running.18:24
naccxnox: :) is there a "new" path to check for systemd running? /run/systemd then, i guess you mean?18:24
naccxnox: ah yes, thanks!18:25
xnox/run/systemd alone is not sufficient.18:25
naccright18:25
naccsorry, misremembered18:25
cpaelzerand here we have an examples how checks like these get to life18:25
cpaelzerwe are all humans and software changes18:25
cpaelzerahasenack: TL;DR we can make this a sync - right?18:25
naccso i don't think it makes sense to keep this delta18:25
naccand i think it makes sene to file a bug upstream and say fix your check18:26
xnoxat one point it was /run/systemd, but then pitti fixed it in all the software and upstream to be be more specific.18:26
naccwith a suggested patch18:26
cpaelzersince we already discussed the other one away18:26
ahasenackcpaelzer: possibly, I'd just like to test that is asks for the password correctly18:26
Vladimirskidrab: thanks, do you know about a good libvirt + virtmanager setup guide?18:26
ahasenackcpaelzer: is debian using systemd?18:26
xnoxnacc, what's the code? because i thought pitti did fix all the things to migrate to the fuller check.18:26
cpaelzerahasenack: yes, but you can switch init systemd if you want to do so badly18:26
cpaelzer-d18:27
naccxnox: cifs-utils18:27
naccahasenack: you checked upstream too?18:27
xnoxlooking at http://pastebin.ubuntu.com/25320448/ it seems wrong18:27
ahasenacknacc: fetching their git repo now18:27
naccahasenack: ack thanks18:27
xnoxsystemd-ask-password is optional, and systemd cgroup exists on upstart+cgmanager+logind and thus without systemd pid118:27
ahasenacknacc: upstream is http://pastebin.ubuntu.com/25320445/18:27
naccxnox: yeah the cgroup check makes little sense18:28
xnoxyeah the comment in 5 is wrong.18:28
ahasenackif any of that fails, it will fallback to getpass()18:28
Vladimirskidrab: btw, is it possible to connect to the virtmanager via the net, instead of having it locally?18:28
naccahasenack: ah! it's to know just whether it should use systemd-ask-password?18:28
naccahasenack: shite code18:28
masonVladimirski: yes18:28
masonVladimirski: Connect via ssh.18:28
ahasenacknacc: yes, that is probably a better alternative for fstab entries during boot18:28
drabVladimirski: I don't know of a tutorial off the cuff, I just google all the time. and yes, you can connect over ssh, which is how I sued it18:28
ahasenacknacc: I've seen it working, btw18:29
masondrab: Did you take all its money?18:29
cpaelzerahasenack: xnox upstream git still is that way as well, not just in debian18:29
drabVladimirski: you install virtmanager on your dekstop and libvirt on the server where you do the virtualization18:29
ahasenackit's just like that dmcrypt prompt, it shows up nicely in ubuntu's splash screen18:29
Vladimirskidrab: conncet via ssh to see the gui?18:29
drabmason: ?18:29
naccahasenack: sure, i mean it "does work", but it works by chance, i think18:29
Vladimirskioh I see18:29
Vladimirskidrab: ALright, thank you :)18:29
ahasenacknacc: maybe it would fail on trusty :)18:29
xnoxnacc, ahasenack: https://github.com/systemd/systemd/blob/master/src/libsystemd/sd-daemon/sd-daemon.c#L628 -> sd_booted is the function to use if one is ok linking libysstemd; or one should mimick the check that /run/systemd/system folder exists.18:29
masonVladimirski: Glad drab could help you out with that.18:29
naccahasenack: the semantic they want is "if i am on systemd and systemd-ask-password exists (and is executable?)), use it18:29
cpaelzernacc: ahasenack: but a bug and suggestive patch to upstream and making the package atm a sync should be a good way (as actions for now) - right?18:29
xnoxnacc, ahasenack: feel free to bash upstream with https://github.com/systemd/systemd/blob/master/src/libsystemd/sd-daemon/sd-daemon.c#L62818:29
nacccpaelzer: +118:29
ahasenacknacc: yes18:30
naccahasenack: their variable name is confusing :)18:30
naccahasenack: at a minimum18:30
Vladimirskimason: sorry, I saw your answer as well. Thanks :)18:30
drabafk, bbl18:30
mason:P18:30
Vladimirskimason: didn't mean to leave you out..:(18:30
masonVladimirski: FWIW, you can either ssh to root (just be very careful) or ssh to a user in the right group, so you have some options.18:30
masonEither way, consider using limiters on what the account can do via ssh connection.18:31
ahasenackcpaelzer: ok, so let me try the debian code without our patch, make sure it can mount cifs filesystems during boot18:31
ahasenackand if yes, i'll comment on the mp, we abandon it, and you sync?18:31
cpaelzerahasenack: yes lets do it that way18:31
naccahasenack: requestsync if so18:31
naccand/or the MP (but requestsync will file a bug)18:31
ahasenacknacc: what's that?18:31
naccahasenack: yet another tool :)18:32
masonVladimirski: A quick search turns up: https://serverfault.com/questions/407497/how-do-i-configure-sshd-to-permit-a-single-command-without-giving-full-login-ac18:32
ahasenackanother magical script from ubuntu-dev-scripts? :018:32
ahasenack:)18:32
cpaelzerahasenack: a tool to open a bug to request a sync18:32
naccwhich we'd want in this case, to track down the logic of syncing it (why the delta can be dropped)18:32
nacc(IMO)18:32
cpaelzerfor documentation at least18:32
masonAh, there it is. man authorized_keys and search for command=18:32
naccas it's not entirely obvious to drop a quilt patch18:32
cpaelzernacc: +1 on explaining on a please sync bug18:33
ahasenackok, I'll do that, coment on the reasoning in the bug,18:33
cpaelzerbut to admit I never used the tool but opened the bug the "classic" way18:33
cpaelzerwhich there are 3-5 :-)18:33
Vladimirskimason:  I tend to you private keys when using ssh which seems much more secure18:33
Vladimirskito use*18:33
ahasenackand maybe file an upstream bug to improve the systemd detection, I have to read more carefully what xnox said above18:33
cpaelzerperfect ahasenack18:33
masonVladimirski: If you look at that command section, that works with private keys and provides a bit more protection.18:33
naccahasenack: yeah, i think that can be a card in our board to do after FF18:33
Vladimirskimason: that's great18:34
ahasenackcpaelzer: nacc xnox ok, thanks for the feedback18:34
naccahasenack: yw18:34
masonVladimirski: FWIW, I was using Xen for years, and only in the last year or two am I using libvirt and friends, and I have to say, I quite like it. Very flexible and convenient, and I love virt-manager.18:34
Vladimirskimason: thanks again mason :)18:34
cpaelzerahasenack: yw++18:35
cpaelzerdannf: did I miss the new extra bug on the pflash lock byte issue - or just no time yet to file?18:38
cpaelzerdannf: not that I'd expect to work on it today - just don't want to miss it18:38
cpaelzerahasenack: feel free to drop me a mail with the sync bug eventually18:39
cpaelzerahasenack: in case non picks up today I will tmrw then18:39
ahasenackI'll add it to the mp if that's ok18:40
cpaelzeryeah fine for me18:40
ahasenackcool18:40
cpaelzerI wasn't sure which of our portfolio of options you'd take :-)18:40
dannfcpaelzer: you haven't, i'll file it now19:34
hehehequick question :) reinstalling php app here, on same box, folders permisson 750 files 640 owner is root:www-data, should work but something is a miss - using nginx19:35
hehehegives 403 :))19:35
ahasenackxnox: looking at https://github.com/systemd/systemd/blob/master/src/libsystemd/sd-daemon/sd-daemon.c#L628 finally19:35
heheheI sense I might of omited something I have done before19:35
ahasenackxnox: we could use that to decide if systemd is being used, it's my understanding19:35
ahasenackand then for this particular use case we would add another check to see if systemd-ask-password is available (since you said it was optional), and only then call it19:35
ahasenackthese two conditions: systemd being used, systemd-ask-password installed19:36
ahasenackrighT?19:36
xnoxahasenack, in essence drop the cgroups check, use the check that /run/systemd/system folder exists.19:36
ahasenackright19:36
xnox(because e.g. upstart, cgmanager, cgroups-lite, all face a systemd cgroup for logind integration)19:37
ahasenackuse that for the "is systemd being used?" check instead of what was in that pastebin19:37
hehehein fact in no one would be wrong no one could of been right :)19:37
xnoxack.19:37
hehehe*if19:37
ahasenackxnox: ok, thx. I'll file an issue with upstream19:37
xnoxtah.19:37
ahasenackmh, looks like a lot of people dropped from irc19:38
heheheyes19:38
hehehethey been punished for idling :) by god of action19:38
hehehe*have been19:38
drabhopefully there's no god of poor questions punishing ppl asking for help without doing research first19:42
hehehe:))19:44
dannfcpaelzer: LP: #171096019:52
ubottuLaunchpad bug 1710960 in libvirt (Ubuntu) "QEMU 2.10 may require AppArmor updates for pflash devices" [Undecided,New] https://launchpad.net/bugs/171096019:52
eliamis this place only for ubuntu-server issues or can you help with other more wtfamidoingarghitsbroke linux server-ish kind of things?  specifically mail, stupidly behind NAT which I'd like to correct.20:14
eliamoh, and hi :)20:14
sarnoldwe try to be helpful such as we can..20:15
eliamah ok, thanks :) my question is kind of, what's normal.  ok, I'll try again.  if you have a gateway machine but you don't want to serve mail from the gateway, it appears NAT'ing the SMTP loses a lot of email kind of info that services like postfix need for mail spam blocking (ip mainly)20:16
eliamso, do you setup two mail servers?  one on each hop?  postfix them both?  simple sendmail on the gateway with postfix downstream?  none of the above?20:17
hehehePackage 'php7.0-fpm' has conffile prompt and needs to be upgraded manually20:17
hehehewhat can it mean?20:17
eliamhehehe, I googled it for you :) https://askubuntu.com/questions/921162/how-can-i-automate-a-conffile-prompt-in-unattended-upgrades20:18
hehehety20:19
heheheso automated updates can rewrite default php config?20:19
hehehegoing to apply that fix20:19
eliamI'll setup mail submission on the submission port but turns out I quickly became an open relay and upstream (google) got a little grumpy20:20
sdezieleliam: DNAT'ing a port from your public gateway to your private SMTP listener shouldn't remove anything useful for Postifx to ID spam20:20
drabsdeziel: I don't see the problem with NAT, but in any case, a DMZ with routing would remove the need for NAT'ing if that's a problem20:21
drabeeer, eliam20:21
eliamSo, postfix sees all inbound mail as coming from 'within the network' due to the source ip being the NAT firewall box20:22
drabeliam: you need to basically add a subnet on the gw, put postfix on that subnet and route20:22
sdezieleliam: if postfix sees only the firewall's IP that probably means you have a SNAT/MASQUERADE rule that is wrong20:22
drabthat shouldn't be the case, the gw should only do DNAT, not both SNAT and DNAT20:23
drabyeah, what sdeziel said20:23
eliamhttps://pastebin.com/pZpN4Zy020:25
sdezieleliam: iptables -t nat -nvL POSTROUTING20:25
sdezielor better yet, iptables-save20:25
eliamif you want but there appears to be *a lot* of repeats!20:28
eliamhttp://paste.ubuntu.com/25321152/20:28
sdezieleliam: you shouldn't mix conntrack and state. conntrack replaced the older/obsoleted state module20:29
sdezieleliam: yes, you have quite a few dup20:30
eliamok, I'll look at that.  So, I guess it's DNAT and postfix turned me into a relay (as the whole internal subnet was 'allowed')20:30
sdeziel"-A POSTROUTING -o eth0 -j MASQUERADE" => could be the faulty one. Can you give the output of "ip ro g 192.168.1.70"20:31
sdezieleliam: yes, if you authorized relying from 10.0.0.0/8 and you wrongly masquerade to an IP in that range when reaching the SMTP box, then yeah, open relay20:32
eliamip ro ... http://paste.ubuntu.com/25321194/20:33
sdezieleliam: so yeah, that confirms the issue. You want to make that "-o eth0 MASQUERADE" rule a tad more specific20:34
sdezieleliam: maybe replace it by "-A POSTROUTING -o eth0 -s 192.168.0.0/16 -j MASQUERADE"20:35
sdezieleliam: your LOGDROP chain doesn't log, it just DROP ;)20:36
eliamit's an IMightLogThatSometime chain :)  I turn logging on if I'm interested but the logs get *filled* otherwise so I remove it20:37
sdezielah20:38
eliamso basically I'm a bit confused about iptables then and need to read a little.  external traffic can't see the mail server, hence the DNAT.  If I limit to internal traffic, mail won't reach the mail server, will it?20:39
sdezieleliam: your DNAT and FORWARD rules are OK20:40
sdezieleliam: the problem is that when your firewall/gateway passes the SMTP traffic over to 192.168.1.70, it goes out eth0 and you have a rule that says:20:41
sdezielwhen traffic goes out of fw's eth0, make the source 192.168.1.220:42
eliamoh dear :(20:42
eliamI didn't mean that!20:42
sdezielmost probably not :)20:42
eliammaybe the masquerade is not needed at all then?  The 'gateway' per se is actually just for inbound DMZ traffic and isn't really the network gateway (which is the router).20:43
sdezielreplace "-A POSTROUTING -o eth0 -j MASQUERADE" by "-A POSTROUTING -o eth0 -s 192.168.0.0/16 -j MASQUERADE" and you won't be doing the undesired source rewrite20:43
sdezielah, then I think I know why you added that MASQUERADE rule ;)20:44
sdezielif you remove the MASQUERADE rule things will stop work20:44
eliamurgh!20:45
sdezielif you don't source rewrite, when 192.168.1.70 will respond to 1.2.3.4 (random public IP), it will go via the gateway and no the firewall20:45
sdezielwhich is asymmetric routing and doesn't work20:45
sdezielcan you have the gateway take care of the DNAT itself?20:46
eliamas opposed to the firewall dmz box which I called 'gateway' just to confuse myself?20:46
sdezielhehe20:47
eliamYes, I suppose I could.  I wanted to route *All* inbound traffic to the fw_gateway and have it decide what to do.  That way, the router gw with the dodgy web interface is avoided, however, sounds like I've tied myself up in knots...20:48
eliamat this point, anything to reduce the spam which is literally 96% of all emails I receive!  (the rest come from cron)20:49
sdezielwhat I'd do is put the firewall box "behind" the dodgy router and make the firewall, the network gateway20:50
sdezielthis would avoid the asymmetric routing20:51
hehehewhere are usually systemd service files are located?20:51
sdezielhehehe: systemctl cat <unit_name>, will show you the unit and where all its pieces are coming from20:52
hehehecool thanks!20:52
sdezielnp20:52
sarnoldhehehe: see the list in systemd.unit(5)20:52
eliamyes, that makes sense.  The crazy thing is, I did most of this for fun and it's not really physical boxes.  At some point (once I get the backup space), I'm likely to rebuild and it'll then only be a single box for the services.  I just liked the idea of separating out DNS / mail server / fw / web etc...20:53
eliamso, until that point, dodgy isp nat routing ftw20:54
eliamthanks for debugging and explaining that all for me20:54
hehehewell ok so now I have removed installed custom nginx with modsecurity via using find and rm , then I apt-get install ubuntu 16.04 default20:55
hehehewhen I do nginx -v it cant even do anything20:55
sdezieleliam: depending on what kind of Internet connection you have, you may be able to terminate it on your own machine thus bypassing the dogdy router20:55
hehehenginx -v The program 'nginx' can be found in the following packages:20:56
hehehe * nginx-core20:56
sdezieleliam: by "terminating it" I mean have your public IP(s) directly on your own equipment and use the dodgy ISP device just as modem20:56
heheheI presumed apt-get will simply download and place binary where it belongs20:56
eliamsdeziel, will it annoy you if I let slip I don't have a static ip?  It's uk based fttc with vdsl or something similar20:57
sdezieleliam: with vdsl you have a chance of PPPoE passthrough ;)20:58
sdezieleliam: dynamic IP doesn't matter20:58
sdezieleliam: the idea would be to terminate your PPPoE session on your Linux box, this way, you'd use only the modem part of the ISP device20:59
eliamsdeziel, I cheated because I used the dynamic hostname as the dns server (mine local) so everything serves to the same ip.  it's bonkers really but hasn't broken the internet yet and the ip leases are pretty long.20:59
sdezieleliam: sure, using dyndns makes sense in your case21:00
hehehe:DDD21:00
eliamsdeziel, interesting.  I'm basically running dhcp, dns, fw and gateway so pretty much have the routing covered.21:00
eliamalthough....wifi devices on the network too21:01
eliamanyway, you've helped me understand why something which has annoyed me for sometime is not working (or is working as configured) so many thanks.  I even went on the postfix chat a fair while ago but didn't get any the wiser.21:02
hehehe:)21:03
hehehethis is da top room21:03
hehehe+ #linux and #security21:03
sdezieleliam: moving your PPPoE to your Linux machine will let you bring lots of sanity in all this21:03
sdezielhehehe: if you properly cleaned the manual nginx install, then yes, "apt-get install nginx-core" should get you going21:04
hehehesdeziel: whats the diff between core and full?21:04
sdezielhehehe: core is what upstream ships enabled by default (what they trust and are OK with supporting)21:05
=== ejat_ is now known as ejat
teward*waves*21:05
sdezielhehehe: -full has more modules enabled21:05
tewardnot sure why I wasn't pinged on the question ;P21:05
sdezielyeah, teward's the guy ;)21:05
tewardhehehe: -full has a few extra third-party module21:05
tewards21:05
teward-core is the same thing minus the third-party modules21:05
eliamsdeziel, I believe you, I just don't quite know what that means yet :)  so, step 1: remove all dnat from fw_fake_gateway and dnat from real gw.  Step 2, learn about PPPoE from linux.  Step 3, ....   Step 4, PROFIT!21:05
hehehehttps://askubuntu.com/questions/553937/what-is-the-difference-between-the-core-full-extras-and-light-packages-for-ngi21:06
hehehegot it21:06
tewardhehehe: fun fact: that's my answer on that question :p21:06
sdezieleliam: before diving into PPPoE, you may want to put your ISP device model # into google and check if it supports "bridge mode" or "PPPoE passthrough"21:06
heheheteward: and you can make nginx-monster by adding modsecurity to it :D21:07
tewardhehehe: never going to happen.21:07
tewardat least, not in Ubuntu at this time21:07
hehehegood21:07
heheheits some kind of monstrosity :)21:07
tewardyou want modsecurity for nginx, you can go compile it for the nginx version you're after21:08
tewardi'm not gonna support that in Ubuntu - that's why naxsi was dropped post-Trusty21:08
heheheI did and I endup deleting it all21:08
hehehedecided to simply focus on php apps code quality instead :)21:08
tewardindeed.21:08
tewardif I'm running a WAF, it's probably a Barracuda on the border before the app.  Just saying :p21:09
tewardin any case... if you have any other nginx questions feel free to ping me here :)21:09
teward*drifts back into the world of mail gateways and setting up mail relays for all his email servers*21:09
eliamsdeziel, good tip as the answer is no.  Wish I never let them back in the house when I had two separate devices previously which they swapped out for a 'combined' one.21:09
tewardthis will sound stupid but is there anything wrong with running an IPSec, OpenConnect, and OpenVPN server on the same machine lol21:10
eliamsdeziel, I could always just use it as the 'upstream' and have everything else on a different subnet with the firewall gw in the dmz and as the subnet default route I guess21:10
heheheteward: btw have you looked into japanese open source vpn software?21:10
hehehethey also provide many volunyteer run relays for chinese who want to bypass great firewall :)21:11
tewardhehehe: (1) I'm not chinese.21:11
teward(2) I'm an IT Security pro who knows 99% of those VPN softwares contain malware.21:11
hehehevolunteer21:11
hehehehmm lets see21:11
teward(3) Chinese hackers use those VPNs, and I don't want the Feds to come down on me like a bag of hammers.21:11
tewardso, no thanks!21:12
hehehehttps://www.softether.org/21:12
hehehethat one21:12
eliamsdeziel, now I remember21:12
sdezieleliam: yeah, if you can configure the ISP device to have 2 subnets/VLANs that might be your best bet21:12
eliamI think the isp dnat only works for external traffic21:12
eliamhmmm, maybe that's ok actually21:13
sdezieleliam: yeah, that would seem OK to me :)21:13
eliambut that had something to do with the original decision making somehow21:13
eliammaybe before I setup the dns21:13
eliamyes, so, external mail traffic hits the dnat to the mail server, internal mail traffic is routed directly.  (in real terms, I don't need to change the settings on my phone for my mail app when I walk in / out the door)21:15
sdezielfor your internal traffic to be routed directly, you probably need a private DNS entry that says "mail.mydomain.com IN A 192.168.1.70"21:17
heheheso I installed nginx-core from ubuntu repository and now - stat("/var/www/html/index.html", 0x7ffed26685c0) = -1 EACCES (Permission denied)21:22
hehehewhen I run strace - however I got index.php and php fpm works, 0 errors21:22
heheheI did try to open test php file I made and I get file not found21:23
eliamsdeziel, yes, the internal dns zone is configured21:23
eliamsdeziel, does iptables-save use something cached?21:24
sdezieleliam: no, iptables-save dumps verbatim what's loaded in the kernel21:24
eliamsdeziel, ok, follow on question :) -F -X doesn't actually clear the firewall?21:25
sdezieleliam: you can't use both -F and -X at the same time21:25
eliamsdeziel, iptables -L now shows nothing.  iptables-save shows *a lot*21:25
eliamsdeziel, sorry, iptables -F && iptables -X (not using the flags together)21:26
sdezieleliam: I personally prefer to do this: iptables-save > ruleset; vim ruleset; iptables-restore ruleset21:26
hehehei use ufw its a bit easier21:26
eliamsdeziel, sure but iptables-save is dumping a whole host of stuff when iptables -L shows nada21:27
eliamI'll try using restore instead21:27
sdezieleliam: iptables -L, shows you the filter table only while iptables-save gives you all21:27
heheheeliam: talking about bugs there is actual bug on my monitor now :)21:27
heheheattracted by light21:27
eliamwe had cockroaches in the office.  say no more!21:28
hehehelol21:28
eliamfirst I new was an email from another team saying 'serious bug found this morning' with an attached pic21:28
eliamknew21:28
eliamurgh, think I'm tired now21:28
hehehelol eliam why do you use such complex mail setup?21:28
hehehewhats it for?21:29
eliamtime to go break stuff and try to work out how it all fits back together21:29
eliamhehehe, it's not complex, it's just email21:29
eliamhehehe, as in, roll your own21:29
hehehewell then make a standalone server for it21:29
hehehewith own ip21:29
eliamhehehe, I don't have any real ip ;)21:29
hehehewell ask ISP for one21:30
eliamhehehe, lol! what fun would that be!21:30
eliamhehehe, this is mail masked dnat gateway confusion.  it's a much better setup21:30
sdezieleliam: if you settle on using iptables-save/restore, you may want to install "iptables-persistent" as it will take care of loading up your rulesets on boot21:31
sdezieleliam: removes the need to run a script that loads 1 rule at the time21:31
ChmEarlwhat day was 16.04.3 released?21:31
eliamsdeziel, I have a rule somewhere on boot which reads the last iptables-save I did21:31
heheheeliam: I simply pay some guys to maintain email server for me :) even easier21:31
eliamhehehe, ease doesn't teach though21:31
ChmEarlis it the moddate on /etc/os-release?21:31
sdezielChmEarl: https://wiki.ubuntu.com/XenialXerus/ReleaseSchedule says August 3rd21:32
heheheeliam: correct and once I become all knowing I will know it anyway :)21:32
eliameliam: How does email work?  hehehe: I pay some guy and stuff happens :)  I want to know what stuff, when, how etc21:33
ChmEarlsdeziel, ty that page is what I need21:33
heheheeliam: well you see if I am to learn and learn and learn - instead I choose to know myself, once I am fully myself I will know all anyway21:34
eliamhehehe, let me know if it works ;)21:34
heheheI did run 1 stand alone email server before cant say if it was secure secure but I did setup dkim spf and emails were going to inboxes :)21:35
hehehehow I can print  out a list of packages I got installed grouped by main universe multiverse and 3rd party?22:24
dlloydapt-cache policy will give you both package name and source22:28
dlloydscratch that22:28
dlloyddisregard me22:28
drabI don't know of any command, cache, showpkg or policy that will provide that info22:49
drabthe best I can think of is something that parses the list of pkgs and matches them to the list of pkgs from the mirrors22:49
drabsomething like this:22:50
drabdpkg -l | awk '{print $2}' | tail -n+6 | xargs -i grep -o {} /var/lib/apt/lists/*_binary* | sort | uniq22:50
drabfrom the file name that matches you should see the arch, the pool, the mirror, everything basically, since the name is a concatenation of all those info22:50
sarnoldawk '/^ii/ {print $2}'22:50
draboh, better, yes22:51
sarnoldoh then you can skip the tail too22:51
drabgood point22:51
drabhehehe: dpkg -l | awk '/^ii/ {print $2}' | xargs -i grep -o {} /var/lib/apt/lists/*_binary* | sort | uniq22:52
hehehecool, ty22:52
=== _liam is now known as eliam
drabthis ntp business leaves me pretty perplexed...23:08
drabsome clients seem to simply not reconnect, just sit there saying there's a pool and do nothing, have to restart ntp, which isn't really good23:09
hehehein etc/apt when I check sources list I see digital ocean repo however its not a sources.list.d dir and main file is generated on a boot, so from where it comes from?23:10
hehehedrab: which ntp biz?23:10
nacchehehe: are you on digital ocean?23:11
heheheno on ovh, just ages ago when installing mariadb I added digital ocean repository - copy pasted tutorial , now I purged it and will install ubuntu one instead23:13
hehehehowever have to remove that digital ocean entry first23:13
AdamMcDoes the version of apache that comes built-in on Ubuntu 17.04 Server support Virtual Hosting?23:42
sarnoldif adammc returns, https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04 looks useful23:53

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