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:
|
Use the following command to create a new container with reduced memory and storage:
|
||||||
|
|
||||||
```bash
|
```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 \
|
--net0 name=eth0,bridge=vmbr0,firewall=1 \
|
||||||
--net1 name=eth1,bridge=vmbr1,firewall=1
|
--net1 name=eth1,bridge=vmbr1,firewall=1
|
||||||
```
|
```
|
||||||
|
|
||||||
### OpenWRT Firewall Configuration
|
```bash
|
||||||
|
pct start 100
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pct console 100
|
||||||
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
passwd
|
passwd
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### OpenWRT - Installing Packages via CLI and Reboot
|
||||||
|
|
||||||
|
```bash
|
||||||
|
opkg update
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
opkg install qemu-ga
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
reboot
|
||||||
|
```
|
||||||
|
|
||||||
|
### OpenWRT Firewall Configuration
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
vi /etc/config/network
|
vi /etc/config/network
|
||||||
```
|
```
|
||||||
@@ -61,6 +83,11 @@ config interface 'lan6'
|
|||||||
option ip6addr 'fd00::1/64'
|
option ip6addr 'fd00::1/64'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- **Restart Network Services**:
|
||||||
|
```bash
|
||||||
|
/etc/init.d/network restart
|
||||||
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
130 j
|
130 j
|
||||||
```
|
```
|
||||||
@@ -96,35 +123,13 @@ config rule
|
|||||||
|
|
||||||
After updating the configuration files:
|
After updating the configuration files:
|
||||||
|
|
||||||
- **Restart Network Services**:
|
|
||||||
```bash
|
|
||||||
/etc/init.d/network restart
|
|
||||||
```
|
|
||||||
|
|
||||||
- **Reload Firewall Settings**:
|
- **Reload Firewall Settings**:
|
||||||
```bash
|
|
||||||
/etc/init.d/firewall restart
|
|
||||||
```
|
|
||||||
|
|
||||||
### Installing Packages via CLI and Reboot
|
|
||||||
```bash
|
```bash
|
||||||
opkg update
|
/etc/init.d/firewall restart
|
||||||
```
|
|
||||||
|
|
||||||
```bash
|
|
||||||
opkg install qemu-ga
|
|
||||||
```
|
|
||||||
|
|
||||||
```bash
|
|
||||||
reboot
|
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
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):
|
Kali Linux Container (ID: 200):
|
||||||
```bash
|
```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
|
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