/srv/irclogs.ubuntu.com/2016/01/25/#ubuntu-server.txt

=== Monthrect is now known as Piper-Off
tsimonq2hi, where would the last meeting's logs be? I can't seem to find them...00:27
=== m1dnight1 is now known as m1dnight_
PCatineanHello everyone, I have received an email from the hosting service that my server was sending out spam.Looking at the server logs I see hundrets of email being sent constantly07:10
PCatineanI've shut the postfix server down for now but now I need to investigate and see the cause, can anyone please help me debug this so I can take the proper course of action?07:11
cpaelzerPCatinean: Hi, is that the same discussion as started on #ubunutu ?07:11
PCatineancpaelzer, yes it's the same, I was refered to this chan for ubuntu server, but yeah07:12
cpaelzerPCatinean: IHO - since the discussion there already started to drag in more people lets keep it there for now07:12
PCatineanOk will do, thanks cpaelzer07:13
cpaelzerPCatinean: we are fine to get here again if they refer you to go "off" the chan :-)07:13
PCatineanHaha, ok thanks :D07:13
PCatineanwhat is your take on this btw cpaelzer ?07:15
cpaelzerPCatinean: I'm not an expert, but I'm fine giving you my take :-)07:17
cpaelzerPCatinean: in general I'd have two ways of attack #1 stop it spreading #2 analysis07:17
PCatineanDone first by shutting down postfix server I guess07:17
cpaelzerPCatinean: #1 would mean I take the server off the network entirely (if possible) and keep it for later debugging07:17
cpaelzerPCatinean: replacing it with a totally fresh and healthy new one for a while at least07:18
cpaelzerPCatinean: then there would be time to do #2 and find out what happened - with that you have an idea if/what to search in your further environment07:18
cpaelzerPCatinean: there are a few good links I found on the first search - probably those guys have thought way more about it - e.g.07:18
cpaelzerhttps://wiki.ubuntu.com/BasicSecurity/DidIJustGetOwned http://serverfault.com/questions/218005/how-do-i-deal-with-a-compromised-server  http://www.cert.org/historical/tech_tips/win-UNIX-system_compromise.cfm (old)07:19
PCatineanThanks a lot cpaelzer07:20
PCatineanBtw I have ispconfig installed if that makes a difference07:20
cpaelzerPCatinean: honestly If I'm in your situation I'd go to people who did that more often - I expect there are a lot things that can be done right or wrong :-/07:21
cpaelzerPCatinean: are you in the lucky case that you have some kind of official support contract like http://www.ubuntu.com/management/ubuntu-advantage (or others) - so you could tap on these ressources?07:21
cpaelzerPCatinean: if not my personal way would go to some friends with an IT Sec background, but well you need to find those right :-)07:22
cpaelzerPCatinean: if nothing of that is an option for you my (personal) direction would be as stated above, take it off the net, replace it so your service works and read all the links (and more) to start breaking down what happened07:23
cpaelzerPCatinean: I never used ispconfig, so I don't know if it would help you in any way in this case07:23
cpaelzerPCatinean: all of that https://wiki.ubuntu.com/BasicSecurity is good, but most is about preparing, IMHO only the part I linked before is for "after-the-fact" cases07:24
PCatineancpaelzer, thank you for the detailed answer.It's clear that I just have to read through links, break them down one by one and In the meantime I've contacted a sysadmin07:24
cpaelzerPCatinean: yeah thats probably wise, so you are not owning the systems but only the services on them?07:25
PCatineanI do own the system I have full root access07:25
cpaelzerPCatinean: but it is hosted somewhere for you then  regarding "I contacted a sysadmin"?07:26
PCatineanAh yes he is a general sysadmin does not belong to the hosting company where the admin is07:27
cpaelzerPCatinean: ok, sorry I couldn't help more - I hope you quickly find what happened and it isn't too widespread07:27
PCatineanSysadmin as in he works with this stuff on a regualar basis not like me that I just need them when I need to put my programming work online07:27
PCatineanMe too, thanks a lot for your patience :D07:27
cpaelzerPCatinean: ok, I see that is your friend to ask then07:27
=== Lcawte|Away is now known as Lcawte
PCatineancpaelzer, found this in the log, I think this is the first time they broke in08:59
PCatinean82.211.31.23208:59
PCatineanoops no that's the ip08:59
PCatineanhttp://hastebin.com/izuwihohon.pl08:59
cpaelzerPCatinean: well then it is at least not too old yet09:03
cpaelzerPCatinean: this can be false positives in case the IP is actually one of you and missing in @local_domains_maps09:04
PCatineanIt's sending out emails to trolololo, that wasn't any of our users for sure :))09:04
PCatineanSo it does not specify which email address was used?09:05
cpaelzerPCatinean: it seems it doesn't specify, but since with SMTP the sending addr could easily be faked it might only lead you astray anyway09:06
cpaelzermaybe that is why they didn't report it09:06
PCatineanSorry not to familiar with the terms and how it works09:07
PCatineanDoesn't that line imply that the email server received a order to send to those email addresses which means somebody had a username?09:07
cpaelzerPCatinean: well they faked the submitter to example.com didn't they09:08
cpaelzerPCatinean: yes I read it as it got an order to send, but authentication and SMTP are two things that don't stick together all too well09:09
cpaelzerPCatinean: just read the first paragraph https://en.wikipedia.org/wiki/Email_spoofing :-)09:09
cpaelzerPCatinean: so I'm not saying that alone09:09
cpaelzerPCatinean: so far you only know that someone was able to connect to your SMTP - "if and which" authentication you set in front of that is up to you as SMTP itself doesn't imply one09:10
cpaelzerPCatinean: https://en.wikipedia.org/wiki/SMTP_Authentication for basics, you have to find what of that or similar your setup uses09:11
cpaelzerPCatinean: and then you are right to assume that somebody went past that09:11
PCatineanhmm hmm hmm09:11
cpaelzerPCatinean: the reported IP could also be one path for you to take a look09:15
cpaelzerPCatinean: while it might be likely that this wasn't the origin, but just an hop in between09:16
cpaelzerPCatinean: it might still be worth to send a mail to the owner so they can check - maybe they are compromised as well09:16
PCatineanpfuuu this is complex stuff when you have no idea09:16
cpaelzerPCatinean: "seems" to be from http://www.accelerated.de/en/ and they do hosting09:17
cpaelzerPCatinean: so maybe just one of the systems they host is compromised as well09:17
cpaelzerPCatinean: yet I'd consider it nice if you let them know about it09:17
cpaelzerPCatinean: you can (more or less) check IPs with e.g. https://www.whoismyisp.org/ip/82.211.31.23209:18
cpaelzerPCatinean: but then be aware that mostly you only finde the ISP with that - stil lin this case it seems to point at a particula data center service provider which is good09:18
cpaelzerPCatinean: as the have likely personal to deal with such stuff09:18
cpaelzerPCatinean: on their end at least09:18
cpaelzerPCatinean: you still have to find how they passed your security/auth but that depends too much on what you actually had set up09:19
cpaelzerPCatinean: I talked to a few more people and - while I don't know if that is an option for you - other than taking it just off the network we weould have a few more hints09:27
cpaelzerPCatinean: that would be - before you start looking around on that system clone off the disks (in case the rootkit or whatever removes itself to not be found you can go back and try again)09:28
cpaelzerPCatinean: also any analysis should be done from "the outside" so not on that system booted, but from another system mounting the disks09:28
cpaelzerPCatinean: otherwise the rootkits can hide themselve too good09:28
cpaelzerPCatinean: but as I said, I don't know if that is an option for your hosted environment09:29
PCatineancpaelzer, this is eeary09:31
PCatineanhttp://hastebin.com/tamuhijoji.rb09:31
PCatineanI think the test email username has been hijacked?09:32
PCatineanThis is the first time things started acting up in the logs09:32
cpaelzerPCatinean: another hint from some friends http://www.gfi.com/blog/top-20-free-digital-forensic-investigation-tools-for-sysadmins/09:36
cpaelzerPCatinean: but almost all efforts start with cloning and taking it offline09:36
cpaelzerPCatinean: yeah that looks like the auth for the test account09:37
cpaelzerPCatinean: is that still in the default setup?09:37
PCatineanCan't take it offline as it is a production server :(09:37
cpaelzerPCatinean: that might be the most likely issue09:37
PCatineanThe default setup of postfix? yes09:37
PCatineanand ispconfig09:37
cpaelzerPCatinean: well than IMO you WILL take it offline at some day - there is no way keeping a compromised system in the long run09:37
cpaelzerPCatinean: you never know "what else" might be in there09:38
PCatineanWell I can make a fresh install in the weekend I guess and config everything from scratch09:38
PCatineanJust I need to know what went wrong and fix it the next time09:38
cpaelzerPCatinean: but do it on a different system if you can, so you have time to analyze this one more thoroughly09:39
cpaelzerPCatinean: follow all of this and likely more http://serverfault.com/questions/644219/postfix-and-compromised-accounts09:40
cpaelzerPCatinean: but I guess you already did the first time - at least you have amavis and such09:40
PCatineanNot sure if I want to wipe the entire system because of something like for example: having test@site.com with a weak password09:42
cpaelzerPCatinean: if you are sure it was just that it - after all it is your call to make anyway09:42
PCatineanI can never be sure but the evidence tends to point at this09:45
peetaurHi, when trying to do "apt-get update" using either de.archive.ubuntu.com or us.archive.ubuntu.com (didn't try others), I get this error:  W: Failed to fetch http://de.archive.ubuntu.com/ubuntu/dists/precise-updates/main/binary-i386/Packages  Hash Sum mismatch10:01
peetaurseems to happen on any server. So ... what can I do to get it fixed?10:01
peetauronly affects precise, not trusty.10:02
peetaurand not just main repo, but also universe10:02
PCatineanIs this bad? smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination10:09
peetauralso not sure if related... but I get some bzip2 errors also, also only for precise, not trusty... but if I delete these repos from my apt-cacher-ng server, the errors go away https://bpaste.net/show/6ae2b0ac149710:10
peetaur(and the first error happens with or without using apt-cacher-ng)10:11
lordievaderGood morning.10:47
MacroManWanted to check that calling debchange -nmu on a package that I am building will prevent apt-get from overwriting my installed package?12:22
ikoniaI wouldn't say thats the best way to do it12:25
ikoniaI'd look at pinning it pre-install12:25
ikoniaor changing the package name to significy it's your custom version assuming nothing depends on it12:25
MacroManikonia, Thanks. So I'd use debchange --create for that ?12:27
ikoniadoesn't that just create a diff12:28
MacroManEfectively creating my own unique package12:28
rbasakIf the package in the archive is version 1.0-1, I usually use 1.0-1.1~local1 or something like that. Then any security or bugfix updates will trump my local version, but I can set up a package hold to avoidthat if I wish.12:30
* MacroMan is reading more docs on debchange12:30
rbasakMacroMan: you want to focus on how apt works and how Debian version strings are compared (defined in Debian policy, test with dpkg --compare-versions)12:30
MacroManrbasak, Cool thanks.12:31
rbasakMacroMan: debchange is really for the common cases only. It just changes the version string in certain preset ways.12:31
rbasakMaintainers can always trump debchange by changing the version string manually12:31
MacroManOK. Well my use case is adding a config string onto nginx and repackaging for install. I really just want apt to not overwrite my package and let me upgrade it manually.12:32
MacroManMy use it important that it remains my version and not the maintainers, even for security as my setup completely relies on my change.12:32
rbasakIs this for HTTP/2 support?12:32
MacroManNo, image_filter.12:33
MacroManI'm already using their repo which has http/2 enabled.12:33
MacroManThis for an image server only and so if image_filter stops working, so will all my image resizing12:34
rbasakSay on Trusty, where nginx is 1.4.6-1ubuntu3. I would rebuild as 1.4.6-1ubuntu3+local1. Then I'd add a package hold using dpkg --set-selections.12:35
rbasakI'm not absolutely sure this works as you want. Please check before using!12:35
rbasakAlso, obviously you want to be keeping a very close eye on any nginx security notices.12:35
=== Lcawte is now known as Lcawte|Away
MacroManPresumibly calling `dpkg --install` will still allow me to install a package even with a hold?12:37
MacroManIt'll just prevent apt from upgrading it?12:37
MacroManFound the answer. And yes it does.12:43
MacroManrbasak, Thanks for that. It's set me on the right track.12:43
=== quantic_ is now known as quantic
MacroManI'm looking to run something to test that one of my servers is online, but sending it a ping every second somehow seems absurd. Is there a better solution?14:41
MacroManThis is to run almost continuously for the next 2 weeks.14:41
hateballMacroMan: what's absurd about that? if you need to know it responds to ping every second, what else would you do?14:53
hateballDo you need to monitor if a certain service is running?14:53
lordievaderZabbix does precisely this to see if something is up.14:53
hateballYes, or nagios or plenty of others14:55
lordievaderUhum14:55
peetaurMacroMan: why not ping? does it use too much bandwidth? :P15:00
OerHeksmake a cronjob that pings every minute?15:01
MacroManJust seemed a little absurd, but I suppose any keep-alive tool will do just that.15:02
MacroManI'm basically having and argument with a data centre over connectivity dropping and them insisting that it's fine. So I want to run a continuous test to show it the connection goes down.15:03
hateballoh they left15:07
peetaur"failure is fine" :D15:09
hateballI was going to suggest them to install smokeping15:10
hateballproduces nice graphs they could hand over15:10
=== roaksoax is now known as roaksoax-brb
jpastoreCan I get a recommendation on where to place a drop rule? the ufw rules files seem a little confusing for something that's supposed to be uncomplicated. basically I want to drop anything not allowed16:08
thebwtif that were a rule, it should be last. But give me a second, there should be a way to make that default (if it isn't already)16:11
jpastorethebwt, I agree it should be the last rule. I think it should go in ufw-after-input chain in the after.rules file is that correct?16:12
=== Lcawte|Away is now known as Lcawte
thebwtohhh you mean direct iptables manipulations. Yes that sounds correct16:13
jpastorewell I'm modifying the ufw config file for persistence.16:14
thebwtgotcha, I thought you where messing with the 'ufw default deny INPUT' type thing. I've not done it that way.16:15
jpastoreso if I add to the /etc/ufw/after.rules as the last line before the commit: -A ufw-after-input -i p5p1 -j DROP it shoudl drop anything not matched prior right?16:15
jpastoreI know p5p1 is weird.16:15
thebwtyes, but it also skips the ufw-reject-input, ufw-after-logging-input, and ufw-track-input chains16:16
jpastorewouldn't that be better in the case of some type of a DoS attack? by rejecting and/or logging, it will cause more of a problem. is it not better to just drop off problems?16:17
thebwtI mean, if that's the objective.16:19
thebwtnot enough context to say, my infra usually sits under  load balancer, so only the ports allowed pass through16:20
thebwtif it's a DoS to some non http protocol, then yea that would help. But usually they're going to be over the stuff you've already allowed16:20
thebwtand if it's a ddos (not a just a Dos like you said) iptables ain't gonna save you16:21
jpastorethebwt, fair enough. thanks for the input16:34
jpastoreI feel like ufw is far more complicated than iptables solo.16:35
^KingHow to check if http is installed on my ubuntu vps?16:48
^Kingvia ssh/putty16:48
rbasaknacc: https://bugs.launchpad.net/ubuntu/+source/php516:53
pmatulisstgraber, hallyn: are there iptables issues with using LXD (especially in regards to using it with Juju)? can iptables rules get in the way somehow?16:53
rbasaknacc: https://bugs.launchpad.net/ubuntu/+source/php5/+bug/131588816:55
ubottuLaunchpad bug 1315888 in php5 (Ubuntu Trusty) "Zlib functions (gzopen etc.) are undefined while gzopen64 etc. exist" [High,Confirmed]16:55
rbasakhttps://bugs.launchpad.net/ubuntu/+source/php5/+bug/7464716:56
ubottuLaunchpad bug 74647 in php "php5-gd not using bundled GD library" [Undecided,Fix released]16:56
rbasakhttps://bugs.launchpad.net/ubuntu/+source/php5/+bug/118425216:57
ubottuLaunchpad bug 1184252 in php5 (Ubuntu) "php5: non-free files in upstream tarball ("The Software shall be used for Good, not Evil")" [High,Fix released]16:57
rbasakhttps://bugs.launchpad.net/ubuntu/+source/php5/+bug/106952916:57
ubottuLaunchpad bug 1069529 in php5 (Ubuntu Raring) "Regression in system fallback for date_default_timezone_get()" [Medium,Fix released]16:57
=== Piper-Off is now known as Monthrect
coreycb`zul, can you sync python-os-win 0.1.1-1 from experimental18:14
zulcoreycb`: 0.0.6-1ubuntu1 is in -proposed18:15
coreycb`zul, it's ok for a sync, debian has py3 support now18:15
lucidguyneed to upgrade a 10.04 server to 12.04.  Can't seem to accomplish this via apt etc.. guess due to eof.  Any predicitons to how successful I'll be using a 12.04 ISO instead?19:17
sarnolddo-release-upgrade ought to do it19:18
lucidguysarnold: I doesnt, you get erorr 404 on some of the repos.  Tried switchout out to archive ones, but still not luck.19:19
patdk-wkonly if he enabled the archives repos for 10.0419:19
lucidguyactually using old-releases.ubuntu.com etc19:20
bekks!eolupgrade | lucidguy19:23
ubottulucidguy: End-Of-Life is the time when security updates and support for an Ubuntu release stop, see https://wiki.ubuntu.com/Releases for more information. Looking to upgrade from an EOL release? See https://help.ubuntu.com/community/EOLUpgrades19:23
lucidguyYeah, followed those instructions, the install pukes19:24
bekkslucidguy: So your computer starts to smell?19:26
bekkslucidguy: Or do you get specific error messages instead?19:26
gQuigswhere can I find what's blocking ceph 0.8.10 from the cloud archive?  (or the cloud archive bug version of 1477174 or 1535278)20:14
gQuigsI'm really looking for when 0.8.11 would be released (or where I can track it) for the cloud archive for precise...20:15
jpastorehi, quick question, Is there a limit to the number of physical cores the stock kernel can support? someone told me it was 16.22:04
jpastorelooking for info to substantiate that22:04
shaunojpastore: there is, but it's way past 16.  try: grep NR_CPUS /boot/config-`uname -r`22:10
jpastorethank you22:12
sarnoldjpastore: you could also use something like num_cpus kernel boot parameter, taskset(1) or cpuset(7)23:08
jpastoresarnold, well I'm trying to figure out how many cores postgres will support and if I need to do anything special to the kernel or postgres. like recompile with other switches...though I'm considering seeing if the intel primatives would be of benefit as well23:13
sarnoldjpastore: the handful of google results that looked like they'd be worth interpreting (with a grain of salt) suggests postgresql scales at least through 64 cores well, but that your workload needs to be parallel enough for it to work -- postgresql will use one task per connection, so if you've just got four connections, that might use four cores, and leave the rest of the cores more or less idle23:17
naccjpastore: do you actually mean physical cores? or do you mean logical cpus?23:26
naccjpastore: iirc, NR_CPUS=256 in the ubuntu kernel (at least glancing at one of my systems) -- and that's the number of *logical* cpus the kernel supports23:26
naccjpastore: so let's say you had HT2 on an Intel CPU, I believe that would mean you had 128 cores enumerable, aiui23:28
naccjpastore: it then depends on how many sockets are in your physical machine, etc23:29
naccthe only way it would be 16, though is, if you had HT4, which I don't think is possible on any of the current generation of Intel CPUs (skylake)23:30
ianorlinI don't think there are multisocket skylake out yet or anything more than say a quad core for skylake as xeons only the E3 have even been anounced23:34
=== Lcawte is now known as Lcawte|Away
naccianorlin: ah true23:48
ianorlinI don't think there are any with four threads per core23:49

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