Created
October 25, 2022 20:48
-
-
Save KimTholstorf/5a1811aa9785348aee0a4936ff30c494 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
package_upgrade: true | |
packages: | |
- zsh | |
- tmux | |
- nmap | |
- curl | |
- wget | |
- git | |
- htop | |
- iperf | |
hostname: ubuntu-jammy | |
fqdn: ubuntu-jammy.home.local | |
users: | |
- name: knt | |
groups: sudo | |
shell: /bin/zsh | |
sudo: ['ALL=(ALL) NOPASSWD:ALL'] | |
ssh-authorized-keys: | |
- ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxx | |
sudo: ALL=(ALL) NOPASSWD:ALL | |
runcmd: | |
- sed -i -e '/^PermitRootLogin/s/^.*$/PermitRootLogin no/' /etc/ssh/sshd_config | |
- sed -i 's|[#]*PasswordAuthentication yes|PasswordAuthentication no|g' /etc/ssh/sshd_config | |
- sed -i 's|UsePAM yes|UsePAM no|g' /etc/ssh/sshd_config | |
- restart ssh | |
#cloudflare argo tunnel | |
- mkdir -p --mode=0755 /usr/share/keyrings | |
- curl -fsSL https://pkg.cloudflare.com/cloudflare-main.gpg | sudo tee /usr/share/keyrings/cloudflare-main.gpg >/dev/null | |
- echo 'deb [signed-by=/usr/share/keyrings/cloudflare-main.gpg] https://pkg.cloudflare.com/cloudflared jammy main' | sudo tee /etc/apt/sources.list.d/cloudflared.list | |
- apt update && apt install cloudflared | |
#crowdsec | |
- curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh | sudo bash | |
- apt install crowdsec | |
- apt install crowdsec-firewall-bouncer-iptables | |
final_message: "The system is finally up, after $UPTIME seconds" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment