Compare commits
1 Commits
v2023.06.2
...
v2023.04.1
Author | SHA1 | Date | |
---|---|---|---|
f5f12194e1 |
@ -1 +1 @@
|
|||||||
v2023.6.23-4a58847
|
v2023.4.14-813f837
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
install-rpi-network-config:
|
|
||||||
mkdir -p files/etc/config
|
|
||||||
cp misc/rpi/uci/network files/etc/config/network
|
|
||||||
|
|
||||||
install-rpi-uci-defaults:
|
|
||||||
mkdir -p files/etc/uci-defaults
|
|
||||||
cp misc/rpi/uci-defaults/* files/etc/uci-defaults/
|
|
@ -1,37 +0,0 @@
|
|||||||
#/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
main() {
|
|
||||||
# Update default firewall ruleset
|
|
||||||
uci add firewall rule
|
|
||||||
uci set firewall.@rule[-1].name='Allow SSH on WAN'
|
|
||||||
uci set firewall.@rule[-1].src='wan'
|
|
||||||
uci set firewall.@rule[-1].proto='tcp'
|
|
||||||
uci set firewall.@rule[-1].dest_port='22'
|
|
||||||
uci set firewall.@rule[-1].target='ACCEPT'
|
|
||||||
|
|
||||||
uci add firewall rule
|
|
||||||
uci set firewall.@rule[-1].name='Allow HTTP on WAN'
|
|
||||||
uci set firewall.@rule[-1].src='wan'
|
|
||||||
uci set firewall.@rule[-1].proto='tcp'
|
|
||||||
uci set firewall.@rule[-1].dest_port='80'
|
|
||||||
uci set firewall.@rule[-1].target='ACCEPT'
|
|
||||||
|
|
||||||
uci add firewall rule
|
|
||||||
uci set firewall.@rule[-1].name='Allow HTTPS on WAN'
|
|
||||||
uci set firewall.@rule[-1].src='wan'
|
|
||||||
uci set firewall.@rule[-1].proto='tcp'
|
|
||||||
uci set firewall.@rule[-1].dest_port='443'
|
|
||||||
uci set firewall.@rule[-1].target='ACCEPT'
|
|
||||||
|
|
||||||
uci commit firewall
|
|
||||||
|
|
||||||
# Disable DNS-rebind protection
|
|
||||||
uci set dhcp.@dnsmasq[0].rebind_protection='0'
|
|
||||||
uci commit dhcp
|
|
||||||
|
|
||||||
reload_config
|
|
||||||
}
|
|
||||||
|
|
||||||
main
|
|
@ -1,9 +0,0 @@
|
|||||||
config interface 'loopback'
|
|
||||||
option ifname 'lo'
|
|
||||||
option proto 'static'
|
|
||||||
option ipaddr '127.0.0.1'
|
|
||||||
option netmask '255.0.0.0'
|
|
||||||
|
|
||||||
config interface 'wan'
|
|
||||||
option ifname 'eth0'
|
|
||||||
option proto 'dhcp'
|
|
@ -1,37 +0,0 @@
|
|||||||
#/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
main() {
|
|
||||||
# Update default firewall ruleset
|
|
||||||
uci add firewall rule
|
|
||||||
uci set firewall.@rule[-1].name='Allow SSH on WAN'
|
|
||||||
uci set firewall.@rule[-1].src='wan'
|
|
||||||
uci set firewall.@rule[-1].proto='tcp'
|
|
||||||
uci set firewall.@rule[-1].dest_port='22'
|
|
||||||
uci set firewall.@rule[-1].target='ACCEPT'
|
|
||||||
|
|
||||||
uci add firewall rule
|
|
||||||
uci set firewall.@rule[-1].name='Allow HTTP on WAN'
|
|
||||||
uci set firewall.@rule[-1].src='wan'
|
|
||||||
uci set firewall.@rule[-1].proto='tcp'
|
|
||||||
uci set firewall.@rule[-1].dest_port='80'
|
|
||||||
uci set firewall.@rule[-1].target='ACCEPT'
|
|
||||||
|
|
||||||
uci add firewall rule
|
|
||||||
uci set firewall.@rule[-1].name='Allow HTTPS on WAN'
|
|
||||||
uci set firewall.@rule[-1].src='wan'
|
|
||||||
uci set firewall.@rule[-1].proto='tcp'
|
|
||||||
uci set firewall.@rule[-1].dest_port='443'
|
|
||||||
uci set firewall.@rule[-1].target='ACCEPT'
|
|
||||||
|
|
||||||
uci commit firewall
|
|
||||||
|
|
||||||
# Disable DNS-rebind protection
|
|
||||||
uci set dhcp.@dnsmasq[0].rebind_protection='0'
|
|
||||||
uci commit dhcp
|
|
||||||
|
|
||||||
reload_config
|
|
||||||
}
|
|
||||||
|
|
||||||
main
|
|
@ -2,7 +2,11 @@
|
|||||||
|
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
block info
|
FLAG_FILE=/root/.disk_resized
|
||||||
|
|
||||||
|
if [ -f "$FLAG_FILE" ]; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
DISK=/dev/mmcblk0
|
DISK=/dev/mmcblk0
|
||||||
PARTITION="${DISK}p2"
|
PARTITION="${DISK}p2"
|
||||||
@ -16,6 +20,6 @@ LOOP_DEVICE="$(losetup -f --show -o "$FS_OFFSET" "$PARTITION")"
|
|||||||
e2fsck -y -f "$LOOP_DEVICE"
|
e2fsck -y -f "$LOOP_DEVICE"
|
||||||
resize2fs "$LOOP_DEVICE"
|
resize2fs "$LOOP_DEVICE"
|
||||||
|
|
||||||
rm -f /etc/uci-defaults/99-resize-disk.sh
|
touch "$FLAG_FILE"
|
||||||
|
|
||||||
reboot
|
# reboot
|
@ -2,7 +2,7 @@ all: rpi-4 rpi-3
|
|||||||
|
|
||||||
rpi-4:
|
rpi-4:
|
||||||
$(MAKE) \
|
$(MAKE) \
|
||||||
ADDITIONAL_INSTALL="install-rpi-network-config install-rpi-uci-defaults" \
|
ADDITIONAL_INSTALL="" \
|
||||||
OPENWRT_TARGET="bcm27xx/bcm2711" \
|
OPENWRT_TARGET="bcm27xx/bcm2711" \
|
||||||
EMISSARY_ARCH="arm64" \
|
EMISSARY_ARCH="arm64" \
|
||||||
OPENWRT_PROFILE="rpi-4" \
|
OPENWRT_PROFILE="rpi-4" \
|
||||||
@ -10,7 +10,7 @@ rpi-4:
|
|||||||
|
|
||||||
rpi-3:
|
rpi-3:
|
||||||
$(MAKE) \
|
$(MAKE) \
|
||||||
ADDITIONAL_INSTALL="install-rpi-network-config install-rpi-uci-defaults" \
|
ADDITIONAL_INSTALL="" \
|
||||||
OPENWRT_TARGET="bcm27xx/bcm2710" \
|
OPENWRT_TARGET="bcm27xx/bcm2710" \
|
||||||
EMISSARY_ARCH="arm64" \
|
EMISSARY_ARCH="arm64" \
|
||||||
OPENWRT_PROFILE="rpi-3" \
|
OPENWRT_PROFILE="rpi-3" \
|
@ -5,7 +5,7 @@ turris: omnia
|
|||||||
omnia:
|
omnia:
|
||||||
$(MAKE) \
|
$(MAKE) \
|
||||||
ADDITIONAL_INSTALL="install-turris-omnia-uci-defaults" \
|
ADDITIONAL_INSTALL="install-turris-omnia-uci-defaults" \
|
||||||
ADDITIONAL_OPENWRT_PACKAGES="losetup squashfs-tools-unsquashfs resize2fs e2fsprogs parted block-mount" \
|
ADDITIONAL_OPENWRT_PACKAGES="losetup squashfs-tools-unsquashfs resize2fs e2fsprogs parted" \
|
||||||
OPENWRT_TARGET="mvebu/cortexa9" \
|
OPENWRT_TARGET="mvebu/cortexa9" \
|
||||||
EMISSARY_ARCH="armv7" \
|
EMISSARY_ARCH="armv7" \
|
||||||
OPENWRT_PROFILE="cznic_turris-omnia" \
|
OPENWRT_PROFILE="cznic_turris-omnia" \
|
||||||
|
Reference in New Issue
Block a user