From 896a1a27498d00a84b51b9e7731949b07723eb30 Mon Sep 17 00:00:00 2001 From: medusa Date: Sun, 21 Apr 2024 23:52:53 +0000 Subject: [PATCH] Update docs/tech_docs/OpenWrt.md --- docs/tech_docs/OpenWrt.md | 46 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/docs/tech_docs/OpenWrt.md b/docs/tech_docs/OpenWrt.md index c0814ae..4335dbc 100644 --- a/docs/tech_docs/OpenWrt.md +++ b/docs/tech_docs/OpenWrt.md @@ -49,12 +49,58 @@ opkg install qemu-ga reboot # Network and firewall configuration + +```bash vi /etc/config/network +``` + +```bash /etc/init.d/network restart +``` + +```bash vi /etc/config/firewall +``` + +```bash /etc/init.d/firewall restart ``` +```bash +vi /etc/config/firewall +``` + +```bash +uci add firewall rule +uci set firewall.@rule[-1].name='Allow-SSH' +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-HTTPS' +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 add firewall rule +uci set firewall.@rule[-1].name='Allow-HTTP' +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' +``` + +```bash +uci commit firewall +``` + +```bash +/etc/init.d/firewall restart +``` + --- ## Alpine Container Setup