版本: 1.0.0 (SemVer)
日期: 2016年3月25日
作者: Felix Geisendörfer, Kevin van Zonneveld, Tim Koschützki, Naren Venkataraman, Marius Kleidl
贡献者:
Bruno de Carvalho,
James Butler,
Øystein Steimler,
Sam Rijs,
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
| # Ask for the user password | |
| # Script only works if sudo caches the password for a few minutes | |
| sudo true | |
| # Install kernel extra's to enable docker aufs support | |
| # sudo apt-get -y install linux-image-extra-$(uname -r) | |
| # Add Docker PPA and install latest version | |
| # sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
| # sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |
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
| sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="/GRUB_CMDLINE_LINUX_DEFAULT="noibrs noibpb nopti nospectre_v2 nospectre_v1 l1tf=off nospec_store_bypass_disable no_stf_barrier mds=off mitigations=off /g' /etc/default/grub | |
| update-grub; update-grub2 | |
| echo "blacklist virtio_balloon" | tee /etc/modprobe.d/blacklist.conf && update-initramfs -u | |
| sed -i '/i915/d' /etc/modprobe.d/blacklist-hetzner.conf || true | |
| sed -i 's/nomodeset//' /etc/default/grub /etc/default/grub.d/hetzner.cfg || true | |
| grub2-mkconfig -o /boot/grub2/grub.cfg | |
| #update-grub |
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
| #!/usr/bin/env bash | |
| # | |
| # Author: Stefan Buck | |
| # License: MIT | |
| # https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447 | |
| # | |
| # | |
| # This script accepts the following parameters: | |
| # | |
| # * owner |
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
| MODEMIP=192.168.1.1 #光猫ip | |
| MODEM_NET=`echo $MODEMIP | cut -d "." -f 1-3` | |
| ROUTER_WAN_PORT_IP=192.168.1.100 #openwrt的ip地址 | |
| WAN_PORT=eth1 #修改为你自己的 | |
| ifconfig $WAN_PORT $ROUTER_WAN_PORT_IP netmask 255.255.255.0 broadcast $MODEM_NET.255 | |
| iptables -A forwarding_rule -d $MODEMIP -j ACCEPT | |
| iptables -t nat -A postrouting_rule -d $MODEMIP -o $WAN_PORT -j MASQUERADE |