Update docs/tech_docs/OpenWrt.md
This commit is contained in:
@@ -19,17 +19,39 @@
|
||||
Use the following command to create a new container with reduced memory and storage:
|
||||
|
||||
```bash
|
||||
pct create 100 /var/lib/vz/template/cache/openwrt-rootfs.tar.xz --unprivileged 1 --arch amd64 --ostype unmanaged --hostname openwrt-0 --tag network --storage local-lvm --memory 128 --swap 0 --rootfs local-lvm:1,size=512M \
|
||||
pct create 100 /var/lib/vz/template/cache/openwrt-rootfs.tar.xz --unprivileged 1 --arch amd64 --ostype unmanaged --hostname openwrt-0 --password changeme --tag network --storage local-lvm --memory 128 --swap 0 --rootfs local-lvm:1,size=512M \
|
||||
--net0 name=eth0,bridge=vmbr0,firewall=1 \
|
||||
--net1 name=eth1,bridge=vmbr1,firewall=1
|
||||
```
|
||||
|
||||
### OpenWRT Firewall Configuration
|
||||
```bash
|
||||
pct start 100
|
||||
```
|
||||
|
||||
```bash
|
||||
pct console 100
|
||||
```
|
||||
|
||||
```bash
|
||||
passwd
|
||||
```
|
||||
|
||||
### OpenWRT - Installing Packages via CLI and Reboot
|
||||
|
||||
```bash
|
||||
opkg update
|
||||
```
|
||||
|
||||
```bash
|
||||
opkg install qemu-ga
|
||||
```
|
||||
|
||||
```bash
|
||||
reboot
|
||||
```
|
||||
|
||||
### OpenWRT Firewall Configuration
|
||||
|
||||
```bash
|
||||
vi /etc/config/network
|
||||
```
|
||||
@@ -61,6 +83,11 @@ config interface 'lan6'
|
||||
option ip6addr 'fd00::1/64'
|
||||
```
|
||||
|
||||
- **Restart Network Services**:
|
||||
```bash
|
||||
/etc/init.d/network restart
|
||||
```
|
||||
|
||||
```bash
|
||||
130 j
|
||||
```
|
||||
@@ -96,35 +123,13 @@ config rule
|
||||
|
||||
After updating the configuration files:
|
||||
|
||||
- **Restart Network Services**:
|
||||
```bash
|
||||
/etc/init.d/network restart
|
||||
```
|
||||
|
||||
- **Reload Firewall Settings**:
|
||||
```bash
|
||||
/etc/init.d/firewall restart
|
||||
```
|
||||
|
||||
### Installing Packages via CLI and Reboot
|
||||
```bash
|
||||
opkg update
|
||||
```
|
||||
|
||||
```bash
|
||||
opkg install qemu-ga
|
||||
```
|
||||
|
||||
```bash
|
||||
reboot
|
||||
/etc/init.d/firewall restart
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
OpenWRT Container (ID: 100):
|
||||
```bash
|
||||
pct create 100 /var/lib/vz/template/cache/openwrt-rootfs.tar.xz --unprivileged 1 --arch amd64 --ostype unmanaged --hostname openwrt-0 --tag network --storage local-lvm --cores 2 --memory 128 --swap 0 --rootfs local-lvm:1,size=512M --net0 name=eth0,bridge=vmbr0,firewall=1 --net1 name=eth1,bridge=vmbr1,firewall=1
|
||||
```
|
||||
Kali Linux Container (ID: 200):
|
||||
```bash
|
||||
pct create 200 /var/lib/vz/template/cache/kali-default-rootfs.tar.xz --unprivileged 1 --arch amd64 --ostype debian --hostname kali-0 --password changeme --tag tools --storage local-lvm --cores 2 --memory 1024 --swap 512 --rootfs local-lvm:1,size=8G --net0 name=eth0,bridge=vmbr0,firewall=1
|
||||
|
||||
Reference in New Issue
Block a user