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

[Mew2]hey anyone here?00:19
joeb3_[Mew2], just ask. someone will answer.00:22
[Mew2]Hey00:23
[Mew2]I setup fail2ban and it's not blocking ip's00:24
[Mew2]Ssh failed logins specifically is what I'm testing00:24
[Mew2][ssh] = true in the config00:26
* [Mew2] whistles00:45
joeb3_[Mew2], https://www.digitalocean.com/community/tutorials/how-to-protect-ssh-with-fail2ban-on-ubuntu-14-0400:52
joeb3_I'm checking that.00:52
[Mew2]joeb3_ thats the guide i followed, minus the email server parts00:54
joeb3_[Mew2], did you try to connect 6 times?  18 passwords?00:58
joeb3_[Mew2], also look at /var/log/fail2ban.log.  It should show ssh is enabled, the max retry, and bantime.01:01
[Mew2]i connected 10 times01:01
[Mew2]can i pastebin this log and my config?01:02
joeb3_yes01:03
joeb3_[Mew2], http://imagebin.ca/v/2S86T61xuo2K01:06
[Mew2]ok so01:08
[Mew2]you were able to make a ban01:08
[Mew2]using my config? or a diff one01:08
joeb3_[Mew2], that was a default install01:09
[Mew2]hmm01:09
joeb3_are you connecting from a different machine?01:09
[Mew2]yes01:09
[Mew2]on which connection did it ban u?01:09
[Mew2]7th?01:09
joeb3_Yes.  I typed the wrong password 18 times.01:09
[Mew2]using putty i hit a wrong username and it disconnects me01:10
[Mew2]i do this 10 times01:10
[Mew2]and it keeps going, never a ban01:10
joeb3_Try a valid username, wrong password.01:10
[Mew2]i dont have a password01:10
[Mew2]using key auth01:10
[Mew2]i tried this with and without the key, never a ban01:12
JanCthere also is a time limit01:13
[Mew2]i did it within about 2 minutes01:14
[Mew2]hmm01:15
joeb3_[Mew2], what does iptables -S show?01:19
[Mew2]let me pastebin it, sec01:20
joeb3_Let me try with ufw01:28
[Mew2]k01:29
joeb3_Still works with ufw.01:31
[Mew2]ok01:31
[Mew2]maybe im not testing this properly?01:31
joeb3_do you see the "authentication failed" messages in /var/log/auth.log?01:32
joeb3_it should show the ip address that is connecting.01:32
[Mew2]no there is no failed authentication message01:33
joeb3_ok, that's where fail2ban looks.01:33
joeb3_so now you have to figure out where your ssh is logging.01:33
TJ-possibly changeled SyslogFacility or LogLevel in /etc/ssh/sshd_config01:34
joeb3_or grep "Failed password" /var/log/*01:35
[Mew2]ok now i cant ssh01:36
[Mew2]i think it worked01:36
[Mew2]how long is the initial ban?01:37
joeb3_ten minutes01:37
[Mew2]ok01:37
[Mew2]i think it worked, ill check in 10 minutes,01:37
joeb3_[Mew2], did you find the problem01:37
[Mew2]i dont know01:37
[Mew2]i tried to ssh in as many times as i could as fast as i could01:38
[Mew2]and something must have triggered it01:38
[Mew2] /var/log/fail2ban.log01:38
[Mew2]this is where i can verify if it worked?01:38
joeb3_yes01:40
[Mew2]ok ill check that in a few minutes01:41
[Mew2]thank you so much joeb3_ TJ- and JanC :)01:41
[Mew2]fail2ban.actions: WARNING [ssh] Ban01:45
[Mew2]fail2ban.actions: WARNING [ssh] Unban01:45
[Mew2]:-d01:45
[Mew2]i am so sorry01:45
[Mew2]i dont know what i was doing wrong01:45
[Mew2]i guess i wasnt testing it correctly01:45
[Mew2]do you guys know if i can use this for other ports then just ssh?01:48
joeb3_yes, look at the samples in the config file.01:49
[Mew2]so to confirm am i doing this on jail.conf or jail.local01:49
joeb3_jail.conf01:50
[Mew2]thank you :)01:51
=== Monthrect is now known as Piper-Off
=== Lcawte|Away is now known as Lcawte
lordievaderGood morning.10:06
jelly[Mew2]: ideally you'd put customizations in jail.local so the default config files are managed transparently on package upgrades13:24
=== Piper-Off is now known as Monthrect
wrksxhello there15:25
wrksxIs ubuntu server a special distrib?15:26
wrksxI'm on "Ubuntu 14.04.3 LTS (GNU/Linux 3.13.0-73-generic x86_64)" it's not server, is it?15:27
sisvewrksx: "Ubuntu has a server edition that uses the same APT repositories as the Ubuntu Desktop Edition. The differences between them are the absence of an X Window environment in a default installation of the server edition [...]" - https://en.wikipedia.org/wiki/Ubuntu_(operating_system)#Ubuntu_Server15:29
Slingyeah apart from the installation procedure and cd/dvd contents there isn't really a difference anymore these days15:29
Slingin the past there were server optimized kernels etc15:29
wrksxokay. How can I know if I'm on server version or not? I didn't installed the system myself15:30
Slingthere is no server version15:30
sisveFor what purpose are you asking?15:30
Slingyou just have ubuntu15:30
Slingwhat packages you install define whether it's suitable for desktop or server use15:31
Sling(or both)15:31
wrksxsisve, because I want to know what is "ubuntu server" and if i'm using it or not. But it looks like "ubuntu server" is a virtual distrib, isn't it?15:31
Slingwrksx: we've said what the differences are, read up15:31
sisveIt's just the name of a template of installed packages.15:32
Slingit's not a separate distribution15:32
wrksxokay I get it thanks15:32
sisveI've got virtual machines that are connected to a datacenter-wide public (but internal to the datacenter) network. I'm trying to limit access to my machines on this internal network to my trusted machines. I often create new machines and would prefer to avoid the hazzle of updating iptables rules every time I add another machine. What's the correct way to solve this?15:35
simosxwrksx, you can verify if it is not Ubuntu Desktop, by the absense of packages. For example, with "apt-cache policy unity" you can check whether Unity is installed. If it is not, then it's not Ubuntu Desktop.15:36
Slingsisve: configuration management like puppet could help there15:36
Slingor ansible, chef, etc.15:36
wrksxsimosx, I guess it's not desktop since it's a cmd line only install15:36
sisveI'm looked into ipsec, but it looks like I need to configure for every single connection (5 machines => 5*4=20 connection). This mail got me all warm inside, but it seems outdated by now. https://lwn.net/Articles/184670/15:36
tewardSling: not sure that's the question they're asking, since they want to avoid having to do that to update their trusted machnes' iptables15:36
simosxwrksx, well, it's possible to configure Ubuntu Desktop to only start the cmd line.15:37
sisveteward: Well, perhaps it's just me being totally off in my approach to. But updating iptables means that I would need to touch _all_ machines everytime I add one more machine.15:38
Slingsisve: with centralized configuration management you could avoid this15:38
Slingit's quite simple to use puppet only for iptables and leave the rest of the system as-is15:38
tewardahh, OK, sisve15:38
Slingset up one of your systems as puppet master15:38
tewardthen puppet or chef or such are where you want to go :P15:38
wrksxsimosx, "unity:15:39
wrksx  Installed: (none)" =)15:39
teward(though, having individual separate subnets, one for 'trusted' one for 'not trusted' is likely a better way to go)15:39
tewardwrksx: simosx: there's another way to determine15:39
Slingyeah the other approach would be overlaying your own network with one or more router-vm's15:39
tewardwrksx: `apt-cache policy ubuntu-desktop`15:39
Slingor rather, getting your own vlan on this network15:39
wrksxInstalled: (none)15:39
tewardcheck for the metapackage, if `ubuntu-desktop` exists then it was installed with the Desktop ISO and has the entire default Desktop suite of applications, however the ultimate point is that Desktop and Server aren't truly specialized on their own15:40
wrksxnice channel guys, keep up the good work15:40
wrksxbbye15:40
tewardSling: that might be the more sensible long term approach for them, because they then don't have to handle firewalling each machine individually15:40
tewardwhich, affecting each system, is a headache in the long term and isn't really scalable15:40
sisveteward: My virtual hosting solution does not allow me per-customer networking; all machines are connected to the internet and optionally a "private network", but it is only private as in "datacenter-wide". All customers are on the same private network.15:40
tewardsisve: then your remaining option is Chef / Puppet15:41
tewardas Sling suggested15:41
Slingsisve: give https://forge.puppetlabs.com/puppetlabs/firewall a read15:41
Slingand test test test before you roll it out in production15:41
Slingnothing worse than making all your servers unavailable because of a puppet firewall messup :)15:42
sisveteward, Sling: Sorry, got pinned down by the concept of "reality". I'll read up on Puppet and that guide now.15:57
tewardSling: serial consoles are for that reason :P17:00
RoyKteward: or network consoles?17:02
tewardthat too :P17:03
RoyKteward: a wee bit simpler since most things are networked these days, and it should track mostly everything except nic driver failures17:06
tewardindeed.17:09
teward*sigh* guess it's time to test NGINX 1.9.9 on Xenial before i upload... VMs are annoying >.>17:09
patdk-laphttp://unix.rulez.org/~calver/pictures/vippy.png17:14
RoyK[A17:24
=== Lcawte is now known as Lcawte|Away

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