when using long range public wifi it matters to block every port from incoming connections.
1 2 3 4
sudo ufw default deny sudo ufw prepend reject in on <intetfece name> sudo ufw restart
when configuration is done, remember to restart ufw and reconnect existing interfaces.
although remote clients are blocked, self-issued connections are not. so be sure to use another computer for testing ufw effectiveness before and after configuration.
config the password with proot -S <path_to_rootfs> -b <boot_partition>:/boot -q qemu-arm /usr/bin/bash and passwd
you’ve installed raspap on this device. you use the default credentials. this shit will not connect to our wifi automatically, thus block your way of running docker containers on it with only macbook.
seriously? do you really need docker on macos? or just on raspberry pi?
change apt sources:
1 2 3 4 5
sudo sed -i 's|raspbian.raspberrypi.org|mirrors.ustc.edu.cn/raspbian|g' /etc/apt/sources.list sudo sed -i 's|mirrordirector.raspbian.org|mirrors.ustc.edu.cn/raspbian|g' /etc/apt/sources.list sudo sed -i 's|archive.raspbian.org|mirrors.ustc.edu.cn/raspbian|g' /etc/apt/sources.list sudo sed -i 's|archive.raspberrypi.org/debian|mirrors.ustc.edu.cn/archive.raspberrypi.org/debian|g' /etc/apt/sources.list.d/raspi.list
using nmcli to scan and connect wifi
1 2 3
sudo nmcli dev wifi rescan sudo nmcli dev wifi connect <SSID> password <PASSWORD>
sharing network:
1 2
ssh -R 1080 pi@10.42.0.33
edit /etc/network/interfaces:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 10.42.0.33 netmask 255.255.255.0 gateway 10.42.0.1 allow-hotplug wlan0 auto wlan0 iface wlan0 inet dhcp #wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf wpa-ssid "<SSID>" wpa-psk "<PASSWORD>"
set things under /data/adb/services.d/ and make them executable
1 2 3
mount -o remount,rw / # then you can modify /sytem/etc/init.d, but not /system/bin cause it is a copy of /data/system/bin. you should create script there.
create this under /system/etc/init.d/
1 2 3 4 5 6 7
service adb_wifi_enable /system/bin/adb_wifi_enable.sh disabled oneshot seclabel u:r:magisk:s0 on property:sys.boot_completed=1 start adb_wifi_enable