Skip to content

Instantly share code, notes, and snippets.

View NewRedsquare's full-sized avatar
😴
Working from home

NewRedsquare

😴
Working from home
View GitHub Profile
@NewRedsquare
NewRedsquare / sshfilter.sh
Created March 24, 2021 20:01 — forked from jokey2k/sshfilter.sh
Tuned version of sshfilter.sh to allow for ipv6 filtering
#!/bin/bash
# based on script from http://www.axllent.org/docs/view/ssh-geoip
# License: WTFPL
# UPPERCASE space-separated country codes to ACCEPT
ALLOW_COUNTRIES="DE EU GB"
LOGDENY_FACILITY="authpriv.notice"
if [ $# -ne 1 ]; then
echo "Usage: `basename $0` <ip>" 1>&2
@NewRedsquare
NewRedsquare / attributes.rb
Created January 9, 2021 19:00 — forked from lizthegrey/attributes.rb
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'