- clestar clear knowledge of what you are doing
- root privileges
- dig
- ufw
- sudo apt update
- sudo apt -y upgrade
- sudo apt install dig ufw
Do not continue if you do not understand the following two lines. Go out, do something else.
- consider 'ufw --dry-run'
- sudo ufw allow to any port 22 proto tcp <-- BE AWARE possible vulnerability
- sudo ufw enable <-- BE AWARE otherwise you are going to regret this. A lot.
Fast copy&paste to console ( except the dangerous part )
sudo apt update;sudo apt -y upgrade;sudo apt install dig ufw;
- update your server backup
- mkdir /tmp/dnsufw/
- git clone https://github.com/IacopoOrtis/DNSUFW.git /tmp/dnsufw/
- mkdir ~/dnsUfw/
- cp /tmp/dnsUfw/dnsUfw.* ~/dnsUfw/
- rm -r /tmp/dnsufw
- chmod -R 500 ~/dnsufw
- chown -R root:root ~/dnsufw
Fast copy&paste to console for the above part
mkdir /tmp/dnsufw/;git clone https://github.com/IacopoOrtis/DNSUFW.git /tmp/dnsufw/;mkdir ~/dnsUfw/;cp /tmp/dnsUfw/dnsUfw.\* ~/dnsUfw/;rm -r /tmp/dnsufw;chmod -R 500 ~/dnsufw;chown -R root:root ~/dnsufw;
- as root:
- sudo -s
- you should know what you are doing
- crontab -e
*/5 * \* \* \* sh /path/to/dnsUfw.sh
- save & exit
- edit "dnsUfw.hosts" file
- test it