Update docs/tech_docs/OpenWrt.md
This commit is contained in:
@@ -49,9 +49,55 @@ opkg install qemu-ga
|
|||||||
reboot
|
reboot
|
||||||
|
|
||||||
# Network and firewall configuration
|
# Network and firewall configuration
|
||||||
|
|
||||||
|
```bash
|
||||||
vi /etc/config/network
|
vi /etc/config/network
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
/etc/init.d/network restart
|
/etc/init.d/network restart
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
vi /etc/config/firewall
|
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
|
/etc/init.d/firewall restart
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user