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 / linux_install.sh
Last active November 2, 2024 10:28
One Click Crowdsec Linux Install
##
## curl -s https://gist.githubusercontent.com/amanjuman/fe6324137c08b356061595e9f76a34b9/raw/b05185579853c8c779408c4bd48df2ea9e33c5a3/linux_install.sh | sudo bash
##
#!/bin/bash
# Function to detect Linux distribution
detect_distro() {
if [ -f /etc/os-release ]; then
. /etc/os-release
@amanjuman
amanjuman / resolved.conf
Last active October 30, 2024 15:16
Enable DNS Over TLS in Debian using Systemd
[Resolve]
DNS=1.1.1.1#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 2606:4700:4700::1001#cloudflare-dns.com 9.9.9.9#dns.quad9.net
DNSOverTLS=yes
FallbackDNS=149.112.112.112#dns.quad9.net 8.8.8.8#dns.google
LLMNR=no
MulticastDNS=no
DNSSEC=no
Cache=yes
DNSStubListener=yes
Prefix/L: fd
Global ID: ef2626
Subnet ID: 100
Combined/CID: fdfc:ef2626:100::/64
IPv6 addresses: fdfc:ef2626:100:xxxx:xxxx:xxxx:xxxx
@amanjuman
amanjuman / Office365 Custom
Created June 4, 2024 05:11
Office365 Custom
Download Office Deployment Tool (ODT)
https://officecdn.microsoft.com/pr/wsus/setup.exe
Generate Configuration from Here
https://config.office.com/deploymentsettings
Or create a file named "Configuration.xml"
<Configuration ID="715bbef8-1f6a-4e50-b9dd-bd8f2185885d">
<Add OfficeClientEdition="64" Channel="Current">
<Product ID="O365ProPlusRetail">
<Language ID="en-us" />
@amanjuman
amanjuman / grafana
Last active March 26, 2024 10:38
Install Prometheus Grafana Node Explorer on Ubuntu
sudo useradd -rs /bin/false prometheus
sudo mkdir /etc/prometheus /var/lib/prometheus
cd /tmp && wget https://github.com/prometheus/prometheus/releases/download/v2.51.0/prometheus-2.51.0.linux-amd64.tar.gz
tar -xvf prometheus-*.*-amd64.tar.gz && cd prometheus-*.*-amd64
sudo mv console* /etc/prometheus
sudo mv prometheus.yml /etc/prometheus
sudo mv prometheus promtool /usr/local/bin/
sudo chown prometheus:prometheus /usr/local/bin/prometheus /etc/prometheus /var/lib/prometheus
sudo nano /etc/systemd/system/prometheus.service
@amanjuman
amanjuman / postfix.md
Created March 2, 2024 06:53
Postfix Inbound and Outbound Configuration for Linux 2024 (SMTP Relay)

Set Server Hostname

hostnamectl set-hostname fqdn.domain.tld

Install Required Packages

sudo apt install postfix libsasl2-modules mailutils -y
@amanjuman
amanjuman / postal.yml
Created January 21, 2024 09:43
Postalserver.io TLS and SMTP Tweaks
general:
# This can be changed to allow messages to be sent from multiple IP addresses
use_ip_pools: true
web:
# The host that the management interface will be available on
host: fqdn.domain.tld
# The protocol that requests to the management interface should happen on
protocol: https
@amanjuman
amanjuman / readme.md
Last active January 21, 2024 09:51
Postal Server Installation Script

Set Server Hostname

hostnamectl set-hostname fqdn.domain.tld

Install Docker

curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh
curl -SL https://github.com/docker/compose/releases/download/v2.24.1/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
@amanjuman
amanjuman / sh.md
Last active November 13, 2024 22:29
Debian 12 Netplan.io

Install Packages

sudo apt install netplan.io openvswitch-switch

Configure Netplan

nano /etc/netplan/network.yaml
network:
@amanjuman
amanjuman / readme.md
Last active September 2, 2024 05:15
Proxmox and pfSense/OPNsense Configuration with Single IP

Enable System IP forwarding first

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

Here is sample network configuration (remove comments "##") Replace your interface name, public IP, internal NAT IP