This repository was archived by the owner on Sep 16, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ sudo systemctl enable ssh
88sudo apt-get update -y
99sudo apt-get upgrade -y
1010# install programs
11- sudo apt-get install expect git zsh python3-pip python3-venv -y
11+ sudo apt-get install expect git zsh ufw python3-pip python3-venv -y
1212# change default shell for root and pi users
1313sudo chsh -s /bin/zsh pi
1414sudo chsh -s /bin/zsh
@@ -27,7 +27,7 @@ cat <<EOT >script.exp
2727set timeout -1
2828spawn sudo ./adafruit-pitft.sh
2929match_max 100000
30- expect -exact "SELECT 1-7 : "
30+ expect -exact "SELECT 1-8 : "
3131send -- "1\r"
3232expect -exact "SELECT 1-4: "
3333send -- "1\r"
@@ -83,5 +83,13 @@ echo "export PATH=\"/root:$PATH\"" >>/root/.zshrc
8383echo " gui.py" >> /root/.zshrc
8484
8585
86+ # block all internet access other than incomming ssh from local network
87+ # outgoing isn't blocked by default, we don't want updates unless we explicitly disable the firewall
88+ ufw default deny outgoing
89+ # allow local ssh
90+ ufw allow from 192.168.1.0/24 to any port 22
91+ # enable ufw, will auto start on boot
92+ echo " y" | sudo ufw enable
93+
8694# tell pi to restart after one minute. This is needed for the ssh changes to work and for the adafruit screen drivers
8795sudo shutdown -r 1
You can’t perform that action at this time.
0 commit comments