Skip to content

Instantly share code, notes, and snippets.

View amanjuman's full-sized avatar
😉
Ill

Aman Juman amanjuman

😉
Ill
View GitHub Profile
@amanjuman
amanjuman / Install-Minecraft-1.18.1-on-Ubuntu-20.04-x64-(log4j2-patch)
Last active May 20, 2022 19:38
Install Minecraft 1.18.1 on Ubuntu 20.04 x64 ( log4j2 patch)
## Update System
sudo apt update -y && sudo apt upgrade -y && sudo apt dist-upgrade -y && sudo apt autoremove -y
## Install Dependency
sudo apt install libc6-i386 libc6-x32 curl -y
## Install Jave
wget https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.deb && sudo dpkg -i jdk-17_linux-x64_bin.deb && rm jdk-17_linux-x64_bin.deb
## Download and install Minecraft
@amanjuman
amanjuman / mta-sts-nginx
Last active October 22, 2021 19:49
Nginx MTA STS Configuration
# This
location ^~ /.well-known/mta-sts.txt {
try_files $uri @mta-sts;
}
# Or This
location @mta-sts {
# add_header Content-Type "text/plain";
return 200 "version: STSv1\nmode: enforce\nmx: mailserver.example.com\nmax_age: 1036800\n";
}
@amanjuman
amanjuman / SendMail with Google Workspace SMTP Relay
Last active February 9, 2025 21:30
SendMail with Google Workspace SMTP Relay
## Update Packages
sudo apt -y update && sudo apt -y upgrade && sudo apt -y dist-upgrade && sudo apt -y autoremove
## Setup Hostname
hostnamectl set-hostname subdomain.domain.tld
## Create Host Record
sudo nano /etc/hosts
## Add this line
@amanjuman
amanjuman / Shiny RStudio Nginx Reverse Proxy
Created September 29, 2021 14:48
Shiny RStudio Nginx Reverse Proxy
server
{
# Listen
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
# Directory & Server Naming
server_name fqdn.domain.tld;
@amanjuman
amanjuman / SendMail with Office365 SMTP Relay
Created September 28, 2021 20:40
SendMail with Office365 SMTP Relay
// Update Packages
sudo apt-get update && sudo apt-get -y upgrade && sudo apt dist-upgrade -y && sudo apt-get autoremove -y
// Setup Hostname
hostnamectl set-hostname subdomain.domain.tld
// Create Host Record
sudo nano /etc/hosts
// Add this line
@amanjuman
amanjuman / Install V2Ray Client on OpenWRT and Configure Vmess
Last active November 18, 2024 15:37
Install V2Ray Client on OpenWRT and Configure Vmess
### The original Author of this package had enabled CloudFlare JS verification. As a result, this automated script will not work.
### Therefore you have to download each package and install it manually.
## Change Directory
cd /tmp/
## Update opkg
opkg update
## If wget not installed already
@amanjuman
amanjuman / Install Tailscale
Last active January 21, 2022 15:13
Install Tailscale
curl -fsSL https://tailscale.com/install.sh | sh
sudo apt-get update && sudo apt-get install tailscale -y
echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.conf
echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p /etc/sysctl.conf
## Linux Up
@amanjuman
amanjuman / AWS SES as SendMail MTA on AWS EC2 Instance
Last active November 18, 2024 10:30
AWS SES Relay with Sendmail
// Update Packages
sudo apt-get update && sudo apt-get -y upgrade && sudo apt dist-upgrade -y && sudo apt-get autoremove -y
// Setup Hostname
hostnamectl set-hostname subdomain.domain.tld
// Create Host Record
sudo nano /etc/hosts
// Add this line
@amanjuman
amanjuman / ssh-harden
Created August 13, 2021 13:48
SSH Hardening
## Remove Existing Host Files
rm /etc/ssh/ssh_host_*
## Regenerate Host Files
ssh-keygen -t rsa -b 4096 -f /etc/ssh/ssh_host_rsa_key -N ""
ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N ""
## Enable Host Files
sed -i 's/^HostKey \/etc\/ssh\/ssh_host_\(dsa\|ecdsa\)_key$/\#HostKey \/etc\/ssh\/ssh_host_\1_key/g' /etc/ssh/sshd_config
@amanjuman
amanjuman / PHPMyadmin Apache2 Subdomain Config
Created June 25, 2021 12:09
PHPMyadmin Apache2 Subdomain Config
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName sql.domain.tld
DocumentRoot /usr/share/phpmyadmin
RewriteEngine on
RewriteCond %{SERVER_NAME} =sql.domain.tld
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>