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