This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apt-get update | |
| apt-get install nginx -y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apt-get install libio-socket-inet6-perl libhttp-daemon-perl libnet-dns-perl libio-socket-inet6-perl libev-dev liburcu-dev libsodium-dev libmaxminddb-dev | |
| ./configure --with-rundir=/var/run && make check && sudo make install | |
| https://github.com/gdnsd/gdnsd/blob/master/init/gdnsd.service.tmpl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #kubernetes | |
| sudo apt update | |
| sudo apt -y install curl apt-transport-https | |
| curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - | |
| echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list | |
| sudo apt update | |
| sudo apt -y install vim git curl wget kubelet kubeadm kubectl | |
| sudo apt-mark hold kubelet kubeadm kubectl | |
| #sysctl | |
| sudo modprobe overlay |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apt-get update | |
| apt-get upgrade | |
| apt-get dist-upgrade | |
| sed -i 's/stretch/buster/g' /etc/apt/sources.list | |
| sed -i 's/stretch/buster/g' /etc/apt/sources.list.d/pve-install-repo.list | |
| apt-get update | |
| apt-get upgrade | |
| apt-get dist-upgrade | |
| #Optional clean kernels | |
| dpkg --list|grep pve-kernel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| frontend https | |
| bind :443 | |
| mode tcp | |
| acl tls req.ssl_hello_type 1 | |
| tcp-request inspect-delay 5s | |
| tcp-request content accept if tls | |
| #Define hosts | |
| acl host_nano.test.com_https req.ssl_sni -i nano.test.com | |
| use_backend nano.test.com_https if host_nano.test.com_https |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #apt | |
| apt-get install curl | |
| apt-get autoremove | |
| apt-get autoclean | |
| apt-get clean | |
| #tmp | |
| rm -rf /tmp/* | |
| rm -rf /var/tmp/* | |
| #logs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Check if a given ip is in a network | |
| * @param string $ip IP to check in IPV4 format eg. 127.0.0.1 | |
| * @param string $range IP/CIDR netmask eg. 127.0.0.0/24, also 127.0.0.1 is accepted and /32 assumed | |
| * @return boolean true if the ip is in this range / false if not. | |
| */ | |
| function ip_in_range( $ip, $range ) { | |
| if ( strpos( $range, '/' ) == false ) { | |
| $range .= '/32'; | |
| } |