Smart Network-Attached Storage (NAS) on OpenWrt

ID Date Version Classification
833998 09/26/2024 1.0 Public

Configuration

Set up HTTP proxy if necessary:

cat <<EOF >> /etc/profile
export http_proxy=http://proxy-shz.intel.com:912
export https_proxy=http://proxy-shz.intel.com:912
export socks_proxy=http://proxy-shz.intel.com:1080
export no_proxy=sh.intel.com,localhost,127.0.0.0/8,169.254.0.0/16,172.16.0.0/12,192.168.0.0/16,10.0.0.0/8
EOF

Finish the necessary configurations:

Configurations are saved under /etc/config/

# set the second interface for WAN
cat <<'EOF' >> /etc/config/network
config interface wan
    option device 'eth1'
    option proto 'dhcp'
EOF

# change hostname
uci set system.@system[0].hostname=joez-openwrt

# allow addresses from upstream nameservers which are in the private ranges
uci set dhcp.@dnsmasq[0].rebind_protection=0

# accept incoming request on WAN
uci set firewall.@zone[1].input=ACCEPT

# commit changes and reboot
uci commit && reboot