From b3f70828ef2ccd3de94f1f284cf5b31dd5798acd Mon Sep 17 00:00:00 2001 From: medusa Date: Sun, 21 Apr 2024 22:22:33 +0000 Subject: [PATCH] Update docs/tech_docs/OpenWrt.md --- docs/tech_docs/OpenWrt.md | 55 +++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/docs/tech_docs/OpenWrt.md b/docs/tech_docs/OpenWrt.md index 2a28d60..c87d812 100644 --- a/docs/tech_docs/OpenWrt.md +++ b/docs/tech_docs/OpenWrt.md @@ -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