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 ACCEPT sudo iptables -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT sudo iptables -A INPUT -p tcp --dpo…


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: # Important PermitRootLogin no PasswordAuthentication no # Double check these PubkeyAuthentication yes PermitEmptyPasswords…


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/authori…