Skip to content

Instantly share code, notes, and snippets.

View Ne00n's full-sized avatar

Ne00n

  • Location Location Location
View GitHub Profile
@Ne00n
Ne00n / wgborign.txt
Last active October 30, 2022 12:38
wg boring
cat << 'EOF' > /usr/local/sbin/boringtun-upgrade
#!/bin/bash
#src https://github.com/Nyr/wireguard-install/blob/master/wireguard-install.sh
latest=$(wget -qO- https://wg.nyr.be/1/latest 2>/dev/null || curl -sL https://wg.nyr.be/1/latest 2>/dev/null)
# If server did not provide an appropriate response, exit
if ! head -1 <<< "$latest" | grep -qiE "^boringtun.+[0-9]+\.[0-9]+.*$"; then
echo "Update server unavailable"
exit
fi
current=$(/usr/local/sbin/boringtun -V)
@Ne00n
Ne00n / iptables-ddns.sh
Last active August 6, 2022 17:25 — forked from eusonlito/iptables-ddns.sh
Update iptables firewall with dynamic DNS updates from cron job
#!/bin/bash
# Set as cronjob
# * * * * * /root/iptables-ddns.sh >> /var/logs/iptables-ddns.log 2>&1
log () {
echo "[$(date "+%F +%T")] [$1] $2" >> "$LOGS/iptables-ddns.log"
}
HOSTS="mydynamichost.ddns.net"
apt-get install unzip -y
adduser scp --disabled-login
su scp
cd
wget https://releases.scpri.me/1.6.3.2/ScPrime-v1.6.3.2-linux-amd64.zip && unzip ScPrime-v* && mv ScPrime-v1.6.3.2-linux-amd64/ current
cd current/ && screen -L -amds scp ./spd -d /home/scp/ScPrime/MetaData -M gctwh && sleep 2 && ./spc wallet init
#save seed
./spc wallet unlock
./spc wallet address
#preload wallet while in sync

Step 1. Starting the Rescue System - Linux 64bit

Activating the Rescue System

To start a server in the Rescue System, it needs to be activated in the Robot.

Under "Main Functions; Server" select the desired server and then open the tab "Rescue". Here the desired variant can be activated.

The password that was given to you when you activated the Rescue System can now be used to login as "root" via SSH. Restarting the Server

@Ne00n
Ne00n / postfix + dovecot
Last active October 22, 2021 19:34
postfix + dovecot
apt-get install postfix postfix-mysql mailutils certbot nginx dovecot-core dovecot-imapd dovecot-lmtpd mariadb-server mariadb-client -y
certbot certonly
echo "submission inet n - y - - smtpd
-o syslog_name=postfix/submission
-o smtpd_tls_security_level=encrypt
-o smtpd_tls_wrappermode=no
-o smtpd_sasl_auth_enable=yes
-o smtpd_relay_restrictions=permit_sasl_authenticated,reject
-o smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
@Ne00n
Ne00n / bird2 systemd priority
Last active September 22, 2021 14:37
bird2 systemd priority
SYSTEMD_EDITOR=tee systemctl edit --full bird <<'EOF'
# /lib/systemd/system/bird.service
[Unit]
Description=BIRD Internet Routing Daemon
After=network.target
[Service]
EnvironmentFile=/etc/bird/envvars
ExecStartPre=/usr/lib/bird/prepare-environment
ExecStartPre=/usr/sbin/bird -p
#!/bin/bash
folder="buster-znc"
packages="wget curl znc python3"
mkdir /tmp/$folder
debootstrap buster /tmp/$folder
cat << EOF | chroot /tmp/$folder
apt-get install $packages -y
exit
EOF
#!/bin/bash
echo "deb http://mirror.ip-projects.de/kernel ./" > /etc/apt/sources.list.d/kernel.list && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys DB7D70AFC28BA18E && apt-get update && apt-get install -y linux-image-5.13.8-gs linux-headers-5.13.8-gs
systemctl enable bird && reboot
@Ne00n
Ne00n / wg + bird
Last active October 30, 2022 13:54
apt-get update && apt-get -y install wireguard iptables fping apt-transport-https lsb-release ca-certificates curl && apt-get -y install bird2 && systemctl enable bird
useradd znc -m -d /home/znc/ -s /bin/bash
su znc -c "mkdir -p /home/znc/.znc/configs"
su znc -c "cat >> /home/znc/.znc/configs/znc.conf << EOF
Version = 1.7.2
<Listener l>
Port = 1025
IPv4 = true
IPv6 = true
SSL = true
</Listener>