PHPnews.io

Overview for 'serversforhackers'

Secure Firewall Setup

Written by Servers for Hackers / Original link on May. 18, 2020

You can view current firewall rules via sudo iptables -L -v.In this video, we'll add to the input chain, which controls incoming (ingress) traffic:sudo iptables -A INPUT -i lo -j ACCEPTsudo iptables -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPTsudo iptables -A INPUT -p tcp --dport…


Secure SSH Setup

Written by Servers for Hackers / Original link on May. 18, 2020

We configure SSH to be a bit more secure. We enforce the use of SSH-key based access and ensure that the root user cannot log in over SSH directly.Edit /etc/ssh/sshd_config:# ImportantPermitRootLogin noPasswordAuthentication no# Double check thesePubkeyAuthentication yesPermitEmptyPasswords no# Opt…


Secure User Setup

Written by Servers for Hackers / Original link on May. 18, 2020

We start by creating a new user and authorizing SSH-based access for an SSH key pair.sudo adduser fideloper# Locally:# cd ~/.ssh# ssh-keygen -o -a 100 -t ed25519 -f id_ed# cat id_ed.pub | pbcopy# Back on server when logged in as user "fideloper":echo "your-public-key" >> ~/.ssh/authorized_key…