Update docs/tech_docs/OpenWrt.md

This commit is contained in:
2024-04-21 23:52:53 +00:00
parent f1375c43a2
commit 896a1a2749

View File

@@ -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