Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,17 @@ cd LLMGuard
npm install
```

#### (Optional but recommended) Create virtual environment

```bash
pip install virtualenv

python3 -m venv .venv

source .venv/bin/activate # for linux
.venv\Scripts\activate # for windows
```

#### Python Dependencies

```bash
Expand Down Expand Up @@ -108,7 +119,7 @@ npm run dev
### 2. Initialize Network Topology

```bash
python3 commands/init_network.py
python3 commands/init_network.py --state-file ./public/simplified_state.json
```

### 3. Access the Application
Expand Down
10 changes: 5 additions & 5 deletions commands/init_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def get_container_image_and_config(self, node_type: str) -> tuple[str, Dict[str,
"""Get Docker image and config for node type"""
configs = {
'firewall': {
'image': 'alpine:latest',
'image': 'alpine:3.19.8',
'command': 'sh -c "apk add --no-cache iptables traceroute && tail -f /dev/null"',
'cap_add': ['NET_ADMIN'],
'privileged': True,
Expand All @@ -98,28 +98,28 @@ def get_container_image_and_config(self, node_type: str) -> tuple[str, Dict[str,
'ports': {'80/tcp': None, '443/tcp': None}
},
'router': {
'image': 'alpine:latest',
'image': 'alpine:3.19.8',
'command': 'sh -c "apk add --no-cache iproute2 iptables traceroute && echo 1 > /proc/sys/net/ipv4/ip_forward && tail -f /dev/null"',
'cap_add': ['NET_ADMIN'],
'privileged': True,
'ports': {}
},
'switch': {
'image': 'alpine:latest',
'image': 'alpine:3.19.8',
'command': 'sh -c "apk add --no-cache bridge-utils iptables iproute2 && tail -f /dev/null"',
'cap_add': ['NET_ADMIN'],
'privileged': True,
'ports': {}
},
'user': {
'image': 'alpine:latest',
'image': 'alpine:3.19.8',
'command': 'sh -c "sleep 3 && apk add --no-cache iptables && tail -f /dev/null"',
'cap_add': [],
'privileged': True, # TODO: Change to non-privileged
'ports': {}
},
'external': {
'image': 'alpine:latest',
'image': 'alpine:3.19.8',
'command': 'sh -c "apk add --no-cache iptables iproute2 && tail -f /dev/null"',
'cap_add': ['NET_ADMIN'],
'privileged': True,
Expand Down