CornfieldWin
Occasional Visitor
I am soliciting input whether or not this Google AI generated advice is considered correct and acceptable Asuswrt-Merlin network management practice or not, and thank you for your responses:
Create or Edit the Startup Script:
iptables -I INPUT -p tcp --dport -j ACCEPT</span><br>
iptables -t nat -A PREROUTING -i br0 -p tcp --dport 8080 -j DNAT --to-destination192.168.1.100:80
4. Make the Script Executable:
chmod +x /jffs/scripts/firewall-start
(Replace firewall-start with the actual script name if different.)
5. Reboot the Router:
Create or Edit the Startup Script:
- Connect to your router via SSH or SCP (e.g., using PuTTY or WinSCP).
- Navigate to the /jffs/scripts/ directory.
- Create a new file or edit an existing one, such as firewall-start or nat-start, depending on the type of iptables rules you are adding.
- firewall-start is executed when the firewall service starts.
- nat-start is executed when the NAT service starts, suitable for NAT-related rules (e.g., port forwarding).
- Open the chosen script file (e.g., firewall-start) with a text editor.
- Add your iptables commands to this script. Ensure the script begins with #!/bin/sh.
iptables -I INPUT -p tcp --dport -j ACCEPT</span><br>
iptables -t nat -A PREROUTING -i br0 -p tcp --dport 8080 -j DNAT --to-destination192.168.1.100:80
4. Make the Script Executable:
- After saving the script, make it executable using the chmod command:
chmod +x /jffs/scripts/firewall-start
(Replace firewall-start with the actual script name if different.)
5. Reboot the Router:
- Reboot your router to ensure the script is executed and the iptables rules are applied during startup.