Skip to content

Instantly share code, notes, and snippets.

View TeroKeso's full-sized avatar

Tero Keso TeroKeso

View GitHub Profile
@TeroKeso
TeroKeso / Readme.md
Created April 1, 2024 12:03 — forked from saniaky/Readme.md
Docker + nginx-proxy + let's encrypt + watchtower + fail2ban

Complete solution for websites hosting

This gist contains example of how you can configure nginx reverse-proxy with autmatic container discovery, SSL certificates generation (using Let's Encrypt) and auto updates.

Features:

  • Automatically detect new containers and reconfigure nginx reverse-proxy
  • Automatically generate/update SSL certificates for all specified containers.
  • Watch for new docker images and update them.
  • Ban bots and hackers who are trying to bruteforce your website or do anything suspicious.
@TeroKeso
TeroKeso / 00 - A collection of free DNS Servers
Created May 24, 2024 10:31 — forked from kasuken/00 - A collection of free DNS Servers
Set and Reset DNS Settings with PowerShell
A collection of my favorites DNS
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@TeroKeso
TeroKeso / user_package_manage.md
Created August 28, 2024 13:45 — forked from dipaish/user_package_manage.md
User Management in Ubuntu

User Management in Linux

Adding and removing users on a Linux system is crucial for system administration. Typically, you start with just the root account, which has full control but can be risky. It's better to create standard users (with no admin rights) for common tasks. In order to execute commands with superuser privileges, you can either log in as a root user (sudo su , not recommended) or use sudo with your commands (recommended).

To perform admin tasks, Ubuntu has a tool called sudo, allowing you to run commands as other users, including administrators.

Create a New User.

You can use the useradd command to add a new user to the system.