[02:39] solved [05:30] good morning [05:36] howdy [07:40] Good morning [07:41] morning [07:42] Hey TafThorne, how are you doing? [07:54] TafThorne: OK thank you. Busy, busy, busy at work but that is better than having nothing to do. How are you? [08:02] Doing good here :) Busy too. [08:15] Hi TafThorne, nice to see you again [08:15] the day we are not busy will be boring [08:16] so embrace it the way it is :-) [08:20] TafThorne: Hi. I am often around, I just do not have much to say. [08:50] TafThorne: You know, you don't need to mention your own name ;) [08:50] s/name/nick [08:57] ops, that was meant to be a cpaelzer: :-D [08:59] TafThorne: Feels as if he should address statements about TafThorne in the third person to help him stand out. [09:03] hehe [09:05] I'm not sure if this is the right place or not, but I am looking for a way of reading a LOT of files and applying programmatic rules to them. Is there an application that is suitable for this task? [09:07] We're talking millions of files ranging from few bytes to gigabytes. The rules I'm looking to apply are for determining wether the files contain specific sequences or strings matching regular expressions, but also on file metadata such as site, filetype even, and so on. [09:14] necrophcodr: grep will do that. [09:14] powersj: that's great. Thanks! [09:15] necrophcodr: I am not saying it is fast and when you start talking about filesystems with multiple GB of data you begin to find other interesting issues. You might benifit from using GNU parallel to run your grep inside. [09:15] TafThorne, grep won't do that unfortunately. Grep will go some of the way, but it will also take too long. [09:17] necrophcodr: it and sed will so that but it will take along time. If your list of files is static you can save some time by getting "cached" lists of the filesystems and diving up the jobs and so forth. [09:17] I think it's about 200GB of mixed data, and it's currently taking around 6-8 hours, depending on the data. [09:17] That's using yara for the file matching, but it's not doing a great job. [09:18] The filelist is not static unfortunately. I could probably run some jobs in parallel, but grep is out the window. [09:19] I guess technically I could use grep but the amount of work to have it match all of our hundreds of rules would take a long time to implement properly. [09:19] necrophcodr: At my old job, that would be a small filesystem. Buy a BlueArc or a HDS HNAS :-D More seriously though, is this all stored on a single linear access disk? Does the system doing the search (and edit?) have lots of RAM to store things in cache? Is the disk networked or directly connected via SATA, eSATA, USB? [09:20] It's on a VM that's on a SAN system, and there's more than 100 of these servers with that kind of storage that I need to scan preferably in less than 5 hours per server. [09:20] And as I mentioned, the file list is not static, nor is the content. [09:21] necrophcodr: Sounds like a horrible problem to solve. Can you scan the files on creation and keep a list of hits? Can you determine modified files since your last scan to make it so you just re-run your results? [09:22] Those are all optimizations for later, I don't have a proper scanning system yet, which is what I'm looking for. [09:22] necrophcodr: The short answer is that I know nothing that will do that for you. A server with a 100GB of RAM and direct storage access should not take that long to crunch the data. You cannot always throw hardware at it though. Sorry I cannot be of more help. [09:22] I'm okay with having to develop one myself as well, but I'd need some idea of what to use, and I'm a bit stumped atm. [09:23] TafThorne, it's no problem, I'm glad I got a quick response! That's not usually the case on some of the irc channels i frequent. [09:24] And I can surely determine modified files and so on, that's part of the plan as well, but it's not yet feasible to do. It might turn out to not be a feasible optimization anyway, I'm not sure. [09:24] Oh, and determining the modification might not be possible with a date alone either, as the data can change but the metadata might be re-written to it's original state, so even the modified date could be reset. [09:27] necrophcodr: doodle? [09:27] TafThorne, what do you mean? [09:27] necrophcodr: You are welcome to the quick response. Just happened to be a topic I had some scant knowledge of. [09:28] https://linux.die.net/man/1/doodle [09:28] necrophcodr: I did some Googling and it suggested you might want to do some doodle(ing). [09:32] TafThorne, thanks, but it doesn't allow me to set up complex rules [09:32] I'll look into what can be done to do complicated rule matching on individual files at high performance [09:46] You might want to write some perl script for that. [09:46] Perl is great at doing regex stuff. [09:47] necrophcodr: There are some possibilities in https://askubuntu.com/questions/29483/software-for-text-search-in-files too I think. [10:52] necrophcodr: doodled, the doodle daemon might do a lot of what you want https://linux.die.net/man/1/doodled Initial indexing would probably be a pain but things might be OK afer that. Although I can see the caviate that doodled " uses libfam and is thus limited to monitoring less than 1024 directories for changes" which might make it not suitable for you. Manually re-running the stnadard `doodle -b ` does not include such a lim [10:53] Looks like a helpful command. I'll probably make a lot of use of it. Nice when trying to help others leads to learning sometihng useful for yourself. [12:27] If anyone here is a junior sysadmin in Stockholm that is looking to change job, PM me.. [12:28] :o === JanC is now known as Guest43740 === JanC_ is now known as JanC === dpawlik is now known as danpawlik_ === danpawlik_ is now known as dpawlik_ === drab_ is now known as drab [15:31] Hey guys, I'm trying to setup logstash and filebeat, when I run filebeat I'm getting ERR Failed to publish events caused by: read tcp 192.168.154.155:49128->192.168.154.168:5443: i/o timeout [15:32] I have the iptable entry to forward 5443 to the server from the client [15:32] I've disabled my firewall to test [15:32] and this is set net.ipv4.ip_forward=1 [15:46] docmur: have you tried to tcpdump at dst? do you see any traffic at all? [15:46] Doing that right nw :) [15:46] :) [15:48] Yep the dest is getting what it needs [15:48] ok, what about tcpdump on client? does it see any traffic back?\ [15:48] it may be a problem of SNAT [15:48] in fact, what does dst see the traffic as coming from? [15:50] IP 192.168.154.155.49148 > elk-master.5443 [15:50] and the port from the src is changing [15:52] eeer, that makes no sense... I was gonna say, ip looks ok, but yeah if the return pkts go to the wrong port that is indeed not going to work [15:52] can you pastebin your nat/fw rules? [15:52] Ha, I was just going to do that :P https://pastebin.com/1dK7ik76 [15:53] but yeah, also tcpdump on the client would be good, just to see if it sees the return traffic [15:53] (even if it ends up discarding it because of unmatching port) [15:54] Ya no traffic on the client :( at port 5443 at least [15:55] you mean the filter is source port 5443? [15:55] ya tcpdump port 5443 on the client I'm sending the logs from [15:56] what if you tcpdump for the dst host's ip? [15:56] I might see the issue actually [15:57] I think it's a host name configuraton issue :S [15:57] I just saw this [15:57] IP elk.domain.net.5443 > 192.168.154.155.49164: Flags [S.], seq 4047232613, ack 332584761, win 28960, options [mss 1460,sackOK,TS val 16123230 ecr 3165914291,nop,wscale 7], length 0 [15:57] it should come baack from elk-master [15:57] I thin kthe domain is mismatched [15:58] mmmh, maybe, maybe not, if the ips are correct and there's no PTR verification or other TLS thing where the cn must match, then it shouldn't matter [15:58] what if you run tcpdump without dns resolution? [15:59] ya that was't the issue [15:59] so the client, the fw and the elk-master are 3 diff boxes? on 2 diff networks? [15:59] can you share a little more about that pls [16:00] So the client is the server itself (192.168.154.155), the elk setup is on a VM (192.168.154.168), I'm doing the routing on the server to the VM [16:01] The firewall is off right now on the serfver, I'm just using the iptables [16:01] the VM is on the same server? [16:01] yes [16:01] so basically everything on the same hw box, correct? [16:01] It's network interface is routed via br0 [16:01] yes [16:03] I'm confused, why do you need iptables? aren't the VM and the server on the same subnet? ie, can't they talk to each other? [16:04] oh, I think I see a possible problem [16:04] There are other VM's that don't come into play that I'm routing to, so I added the rules to route the elk server ports. [16:05] docmur: look at your iptables, the SNAT part, shouldn't the POSTROUTING have a -s 192... you have -d [16:05] so the postrouting is not matching [16:06] at least if I remmber my iptables right, which I may not [16:06] don't mess with that stuff as often anymore [16:07] docmur: you can verify with counters, just do a -L -v with iptables and see if the numbers are incrementing as traffic is fired off, they shouldn't if there's no match [16:07] or just try to change to -s and see if it works :P [16:08] also it's not --dport at that point, it's a source port [16:08] oh okay [16:08] changing it to -s didn't seem to work [16:09] docmur: yeah chjange the --dport to --sport too [16:10] Just did that, trying it now [16:12] Didn't work :S [16:13] I might try the logstash forum [16:14] thanks for your help :) [16:14] to be sure since it's all on the same server, the server isn't considering the elk router's ip as local, is it? [16:14] ip r gives [16:14] 192.168.154.0/24 dev br0 proto kernel scope link src 192.168.154.155 [16:14] so now [16:15] that's it? no default route? [16:15] default via 149.56.240.254 dev eth0 onlink [16:16] My default is the external ip [16:16] k [16:16] do you have any other rules in the fw? [16:16] it's off right now actually just to be sure it's not cauing an issue [16:18] so what I'd do to rule out any other problems is to just test with netcat [16:18] kk [16:18] stop elk for a second, start netcat in listening mode on the server [16:18] and fireoff the client [16:18] using the same port on the server of course so that the firewall rules get tested [16:18] and you can run iptables -L -v -t nat before and after running netcat [16:19] and see if the counters have changes, ie if pkts went through those rules [16:19] doing that now [16:20] btw I'm assuming that for other things connectivity with that box work just fine, correct? ie you can ssh to the VM from the server or something [16:20] I can ssh to it, telnet to port 5443, I can access it's webportal ,etc... [16:26] The pkt counter is going up, about once per 30 seconds [16:35] tbh I'm still not really understanding why iptables is involved...with that routing table/net scenario a pkt for 192.168.154.168 will be routed through the bridge where the VM's interface is also listeinng on and it'll just pick it up === Guest75213 is now known as med_ [16:42] I culd remove it but that problem doesn't go away. I have other VM's that are listening for an external port, which is why I have them in the first place [16:42] oh, I see, I didn't get that, this is just a testing setup [16:43] Anyway, thanks for the help, I posted on the logstash forum [16:45] k, let me know ifyou figure it out, I'm curious now :) [16:45] ya I'll totally post the solution :) [16:45] if you can test with requests from an ip outside of that network, I think it may shed some light on it [16:45] something I still have a feeling part of the issue is the contrived example [16:46] the other thing you could do is to setup another VM on say 192.168.153 or whatever, and use that as a client [20:28] ah, lovely whitespace delta [20:28] Suggests: libnss-ldapd | libnss-ldap $ [20:29] (output of cat -vet) [20:29] and here I was scratching my head why a patch wasn't applying [20:29] - Suggests: libnss-ldapd | libnss-ldap [20:29] + Suggests: libnss-ldapd | libnss-ldap [20:31] set list and set listchars=tab:\ \ ,trail:$ in ~/.vimrc can make those stand out [20:33] nice [21:55] hi [21:55] desktop wfi doez not work [21:55] lol [21:55] connects and nothing [21:56] works on a phone [21:57] and that is an #ubuntu-servertopic because? [22:50] Hey guys, quick question -- our VPS has been going down intermittently throughout the day for 5 minutes at a time [22:50] Is there anything I should be looking for to track what's causing the outage [22:51] logs on both endpoints? [22:51] oh VPS not VPN.. uh.. [22:51] logs on the VPS? :) [22:52] fixthatshit.com [22:52] :) [22:52] I've looked at the logs and we're getting spikes of traffic, which is causing some of the requests to go into a queue, and that's what's pulling our server down [22:52] I just haven't been able to track where the requests are coming from [22:53] well beef up server [22:53] or host with ddos protection [22:53] I updated it to 4 cores from 2 [22:53] it's still having outages, just not as frequently [22:54] just see who is flooding you [22:54] or its legit traffic? [22:54] could it be possibly that we have malware or spyware that's doing this? [22:54] nah [22:54] check access.log [22:54] and see [22:54] stop inventing [22:56] it's certainly possible that you've been compromised; maybe the provider would have network usage graphs that could indicate if you're joined a botnet or something similar [22:56] seems like many dns servers under attack [22:56] hehe [22:56] had to switch to fucking google [22:57] atm [22:57] I'm checking the access.log now [22:57] google's servers have the advantage of doing lookups for 250M users. that means whatever you want is probably already cached. [22:57] hot dns servers are happy dns servers [22:57] 58.6.115.42 was down [22:57] and 43 [22:58] most issues arent a hack [22:58] its a bug [22:58] 99% is bug 1% hack [22:58] bug 1 in Ubuntu Malaysia LoCo Team "Microsoft has a majority market share" [Critical,In progress] https://launchpad.net/bugs/1 [22:58] instant fixes of all [22:59] michr: if there's nothing obvious in logs or hosting provider's usage graphs, you could fire up smokeping to make sure it's still online, collect netstat and similar stats periodically, and try to find patterns when it has trouble [22:59] dude sarnold sometimesw people simply ddos [22:59] or more visitors [23:01] seems free dns servers are under attack [23:01] :D [23:02] comodo is up [23:02] a site I operate periodically have 1-2 minute spikes every hour even ~64 cores + cloudflare doesnt fix ;) [23:02] cloudfare is shit [23:02] its just waf + cdn [23:02] and as someone said servers rangers can be determined easily [23:02] for ddos etc [23:03] for most setups, yes [23:03] people leak addresses everywhere [23:03] you can use aws they got waf too now :D [23:03] cheaper [23:03] most ddosers never get to that stage however [23:03] wtf [23:04] why are they so dumb lol [23:04] well in fact I met police today also not much smarter [23:04] :) [23:04] so ye its cool [23:05] I think soon I will simply use ram only cd r os and keeppasx on air gapped phone [23:05] dont have to worry about browser exploits etc :) [23:05] we had to blacklist a ton of datacenter/VPS operators, so many abusive bots [23:05] @sarnold, @hehehe thanks guys. Gonna try to see if I can figure out what the heck is going on here [23:05] too bad about people rolling their own vpns [23:05] michr: post access.log here [23:05] michr: good luck [23:06] also do u have fail2bank [23:06] fail2ban [23:06] and which firewall you use? [23:06] did you check syslog and firewall log? [23:07] I have to say I am pretty new to linux, just applying common sense [23:09] trippeh: many people are angry [23:10] and been passive agressive they do bots etc [23:10] run scripts [23:10] it will only get more and more [23:11] who dont want to deal with some 0 days :D [23:11] as I said before ram only no write access OS like tails or subgraph seems to be sufficient for most desktop users [23:12] trippeh: I wonder whats going on with my box lol [23:12] DST=224.0.0.1 LEN=32 TOS=0x00 PREC=0xC0 TTL=1 ID=1843 DF PROTO=2 blocked [23:12] and without it dns resolving does not work lol [23:12] emm [23:13] thats just multicast, and you prob have mdns enabled [23:13] just allow multicast in ufw [23:13] it won't hurt you [23:14] cool [23:14] I usually allow 53 80 443 [23:14] thats it :D [23:15] well, multicast is a set of addresses on ipv4 and ipv6, not port numbers [23:17] something like ufw allow to ff00::/8 [23:17] and similar to 224.0.0.0/4 [23:17] those won't cross a router boundary without igmp snooping [23:18] ty [23:18] sudo ufw allow out proto tcp to 224.0.0.1 + udp works now [23:18] also folks any ideas how to figure site hidden api? [23:18] my next project :) [23:19] no idea - pretty vague question [23:19] 1 moment and I will solidify it [23:21] it seems to be client side js site [23:25] http://www.gregreda.com/2015/02/15/web-scraping-finding-the-api/ [23:25] :) [23:26] well I guess I just to read output more carefully [23:27] :D