Skip to content

Instantly share code, notes, and snippets.

@zoonderkins
Last active December 10, 2021 09:54
Show Gist options
  • Save zoonderkins/c741564bd5f8a7395d71cc9589975e2a to your computer and use it in GitHub Desktop.
Save zoonderkins/c741564bd5f8a7395d71cc9589975e2a to your computer and use it in GitHub Desktop.
Debian rc.local auto setup

Setup rc.local to preconfigure your system during startup

#!/bin/sh -e
#
# rc.local
#

timedatectl set-timezone Asia/Taipei

iptables-restore < /etc/iptables/rules.v4
ip6tables-restore < /etc/iptables/rules.v6

rm /etc/resolv.conf

cat <<EOF >>/etc/resolv.conf
nameserver 1.1.1.1
nameserver 1.0.0.1

EOF


ifconfig eth0 mtu 1400 up
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment