#!/bin/sh # ========================================================= # ZTE ONT - TR-069 + WAN WEB/HTTPS configuration # ========================================================= SENDCMD="sendcmd 1 DB" ACS_URL="http://10.69.96.22:9909/v1/acs" ACS_USER="acs" ACS_PASS="acs" echo "========================================" echo " Applying TR-069 / WAN WEB configuration" echo "========================================" # --------------------------------------------------------- # 1. Enable WEB WAN (TCP 80) # PortControl row 0 # --------------------------------------------------------- echo "[1/6] Enabling WEB :80..." $SENDCMD set PortControl 0 PortEnable 1 # --------------------------------------------------------- # 2. Enable HTTPS WAN (TCP 443) # PortControl row 4 # --------------------------------------------------------- echo "[2/6] Enabling HTTPS :443..." $SENDCMD set PortControl 4 PortEnable 1 # --------------------------------------------------------- # 3. Enable TR-069 port 58000 # PortControl row 6 # --------------------------------------------------------- echo "[3/6] Enabling TR-069 port 58000..." $SENDCMD set PortControl 6 PortEnable 1 # --------------------------------------------------------- # 4. Configure ACS # --------------------------------------------------------- echo "[4/6] Configuring ACS..." $SENDCMD set MgtServer 0 URL "$ACS_URL" $SENDCMD set MgtServer 0 UserName "$ACS_USER" $SENDCMD set MgtServer 0 Password "$ACS_PASS" $SENDCMD set MgtServer 0 Tr069Enable 1 # Periodic Inform $SENDCMD set MgtServer 0 PeriodicInformEnable 1 $SENDCMD set MgtServer 0 PeriodicInformInterval 43200 # --------------------------------------------------------- # 5. Save configuration # --------------------------------------------------------- echo "[5/6] Saving configuration..." $SENDCMD save # --------------------------------------------------------- # 6. Verify # --------------------------------------------------------- echo "[6/6] Verification..." echo "" echo "--- PortControl ---" $SENDCMD p PortControl | grep -E 'PortValue|PortEnable|ServName' echo "" echo "--- MgtServer ---" $SENDCMD p MgtServer | grep -E 'URL|UserName|Tr069Enable|PeriodicInform' echo "" echo "========================================" echo " Configuration finished" echo "========================================"