Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aix / drive overflowing #866

Closed
refack opened this issue Sep 6, 2017 · 15 comments
Closed

aix / drive overflowing #866

refack opened this issue Sep 6, 2017 · 15 comments

Comments

@refack
Copy link
Contributor

refack commented Sep 6, 2017

On both test-osuosl-aix61-ppc64_be-1/2 there a file /etc/security/failedlogin that's 300-400MB and it's on the / fs which is only 700MB.
For now I moved it to /home/ in case anyone wants to inspect it.
Looking for ideas on how to limit its size, or roll it over to a bigger partition.

@refack
Copy link
Contributor Author

refack commented Sep 6, 2017

/cc @nodejs/platform-aix

@mhdawson
Copy link
Member

mhdawson commented Sep 6, 2017

I can increase the size of / but it may be better to figure out how to move it ? Was it causing failures or did you notice this pro-actively ?

@refack
Copy link
Contributor Author

refack commented Sep 6, 2017

Not sure about failures, but after a few commands you couldn't even cd:

# cd /home/iojs/build/workspace/node-test-commit-aix
ksh: There is not enough space in the file system.

@refack
Copy link
Contributor Author

refack commented Sep 6, 2017

So a quick look at the IPs in failedlogin looks like it was attempted to be brute forced. Multiple times. The sampled IPs are known abuse sources:
https://www.abuseipdb.com/check/61.177.172.52
https://www.abuseipdb.com/check/218.65.30.53
https://www.abuseipdb.com/check/116.31.116.7

Maybe we need implement some brute force mitigation techniques...

@refack
Copy link
Contributor Author

refack commented Sep 6, 2017

It's already 18MB after < 24h:

bash-4.3# ls -la /etc/security/failedlogin
-rw-r-----    1 root     system     18273600 Sep 06 14:01 /etc/security/failedlogin```

@refack
Copy link
Contributor Author

refack commented Sep 11, 2017

I added the following two line to /etc/ssh/sshd_config:

PasswordAuthentication no
ChallengeResponseAuthentication no

So now publickey is the only available authentication method.

AFAICT this way brute force password guessing is impossible, and also does not generate entries in failedlogin
@rvagg @mhdawson @joaocgreis PTAL

@sam-github
Copy link
Contributor

only allowing public key auth seems like good security practice to me

@sam-github
Copy link
Contributor

@gibfahn can you forsee any negative repercussions to automation?

@refack
Copy link
Contributor Author

refack commented Sep 11, 2017

I'm asking as currently the AIX setup is semi-manual, and I didn't know if a password is used in the earlier stages.

@gibfahn
Copy link
Member

gibfahn commented Sep 11, 2017

@gibfahn can you forsee any negative repercussions to automation?

I can't, but I don't have that much experience with the bootstrapping part of the setup. Previously @mhdawson put my key on them and then I did the rest.

So that'd be a question for @mhdawson .

@joaocgreis
Copy link
Member

This sounds good to me, I can't foresee any issue with doing this. Any machine has to be prepared to run Ansible by adding some key (there might be ways to run Ansible with passwords, but that'd be more work for nothing).

We already have a step to disable sftp, this could be added next to it.

@mhdawson
Copy link
Member

Seems reasonable to me as well, although I'm not an expert at ssh configuration. I don't think there is any step that needs to login with a password as opposed to ssh key, other than possibly when we first receive the machines and have to add the initial ssh key ( I can't remember as its been a long time since I did that)

@refack
Copy link
Contributor Author

refack commented Sep 11, 2017

Great. So I'll try to "ansible"ize that.

@AshCripps
Copy link
Member

Can this issue be closed? theres been no update on it for two years so I assume the problem is fixed?

@sam-github
Copy link
Contributor

Not fixed:

% parallel-ssh -i -h ../hosts/aix61-ppc64_be grep PasswordAuthentication /etc/ssh/sshd_config                                             
[1] 09:24:54 [SUCCESS] test-osuosl-aix61-ppc64_be-2
PasswordAuthentication no
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication, then enable this but set PasswordAuthentication
[2] 09:24:54 [SUCCESS] test-osuosl-aix61-ppc64_be-3
#PasswordAuthentication yes
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication, then enable this but set PasswordAuthentication
[3] 09:24:54 [SUCCESS] test-osuosl-aix61-ppc64_be-1
PasswordAuthentication no
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication, then enable this but set PasswordAuthentication
[4] 09:24:54 [SUCCESS] release-osuosl-aix61-ppc64_be-1
#PasswordAuthentication yes
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication, then enable this but set PasswordAuthentication

Needs to be added to the manual setup instructions in ansible/aix61-standalone/manualBootstrap.md, and it needs to be done the hosts missing the setup.

Can you document, @AshCripps and I'll make the changes?

action items automation moved this from In Progress to done Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

7 participants