```md
# Proxmox + antiX (runit) — Full, minimal, copy-pasteable setup
Goal: each VM gets its own IP on your LAN (192.168.0.0/24) and is reachable via SSH.
**Your topology**
- Router (gateway & DHCP): `192.168.0.1`
- Wi-Fi repeater (bridge only, DHCP off): `192.168.0.222` *(do NOT use as gateway)*
- Proxmox host: `192.168.0.33`
- VMs: e.g. `192.168.0.31`, `192.168.0.32`, …
---
## 1) Proxmox host network: create/verify bridge `vmbr0`
**Why:** VMs must be on the same L2 network as your router.
### GUI (recommended)
- **Datacenter → Node → System → Network**
- Create or edit **Linux Bridge `vmbr0`**
- **Bridge ports:** your physical NIC (e.g. `enp3s0`/`eno1`)
- **IPv4/CIDR:** `192.168.0.33/24`
- **Gateway (IPv4):** `192.168.0.1` *(the router, not the repeater)*
- **Apply Configuration** → reboot host (safe).
### CLI (alternative)
Edit `/etc/network/interfaces` on the host:
```
auto enp3s0
iface enp3s0 inet manual
auto vmbr0
iface vmbr0 inet static
address 192.168.0.33/24
gateway 192.168.0.1
bridge-ports enp3s0
bridge-stp off
bridge-fd 0
```
Apply:
```
ifreload -a # Proxmox has ifupdown2; this is the right way
```
### Verify on the host
```
ip -br a
ip route
ping -c 3 192.168.0.1
ping -c 3 1.1.1.1
```
Expect `vmbr0` = `192.168.0.33/24`, default route via `192.168.0.1`.
---
## 2) Create an antiX VM
- **Create VM** → **OS**: antiX ISO.
- **System/Disk/CPU/RAM**: as needed.
- **Network**:
- **Bridge**: `vmbr0`
- **Model**: `VirtIO (paravirtualized)`
- After install, in **Options** set **Qemu Agent = Enabled** (we’ll install it in the guest below).
---
## 3) VM network addressing
### Option A — DHCP (easiest)
- Ensure DHCP is enabled on the **router**.
- VM will obtain an IP automatically (e.g. `192.168.0.31`).
### Option B — Static IP (outside DHCP pool)
Inside the VM edit `/etc/network/interfaces` (replace interface name with yours, often `ens18`):
```
auto ens18
iface ens18 inet static
address 192.168.0.120/24
gateway 192.168.0.1
dns-nameservers 1.1.1.1 8.8.8.8
```
Apply:
```
ifdown ens18 && ifup ens18 # or: /etc/init.d/networking restart
```
*(Tip: For fixed DHCP addresses, set “DHCP reservation” on the router by the VM’s MAC shown in Proxmox → VM → Hardware → Network Device.)*
---
## 4) Inside antiX (runit): install Guest Agent + SSH and enable services
**Find your interface name**
```
ip -br a
```
**Install QEMU Guest Agent (to show IP in Proxmox Summary)**
```
sudo apt update
sudo apt install -y qemu-guest-agent
# enable via runit (link service directory if present)
\[ -d /etc/sv/qemu-guest-agent ] && sudo ln -s /etc/sv/qemu-guest-agent /etc/service/ || true
sudo sv status qemu-guest-agent || true
```
**Install and enable OpenSSH server**
```
sudo apt update
sudo apt install -y openssh-server
# enable (runit): link service directory into /etc/service/
\[ -d /etc/sv/ssh ] && sudo ln -s /etc/sv/ssh /etc/service/ 2>/dev/null || true
\[ -d /etc/sv/sshd ] && sudo ln -s /etc/sv/sshd /etc/service/ 2>/dev/null || true
# verify service and port
sudo sv status ssh 2>/dev/null || sudo sv status sshd
ss -lntp | grep ':22' || true
```
**If it listens only on 127.0.0.1:22, open it to LAN**
```
sudo sed -i 
-e 's/^#?Port .*/Port 22/' 
-e 's/^#?AddressFamily .*/AddressFamily any/' 
-e 's/^#?ListenAddress .\*/ListenAddress 0.0.0.0/' 
/etc/ssh/sshd\_config
sudo sv restart ssh 2>/dev/null || sudo sv restart sshd
ss -lntp | grep ':22'
```
---
## 5) Confirm IP inside the VM
```
ip -br a
ip route | head -n1 # should be: default via 192.168.0.1
hostname -I
ping -c 3 192.168.0.1
```
---
## 6) Connect via SSH from your LAN PC (or from the Proxmox host)
```
# From Proxmox host (quick test)
nc -vz 192.168.0.31 22 # should say "succeeded"
# From your PC
ssh antix1\@192.168.0.31
```
---
## 7) Quick troubleshooting
- **Gateway must be 192.168.0.1** on host & VMs; the repeater `192.168.0.222` is *not* a router.
- **No DHCP for multiple VMs?** Some repeaters in “client” mode pass only one MAC from their Ethernet port.
Fix: put repeater into true *bridge/WDS* mode, update firmware, or connect Proxmox directly to router/switch.
- **Proxmox Firewall:** disable at Datacenter/Node/VM while testing.
- **Correct device/IP:** compare VM MAC (in Proxmox) with `ip neigh show 192.168.0.xx` from the host.
- **Port open:** `ss -lntp | grep ':22'` must show LISTEN on `0.0.0.0:22` or `[::]:22`.

Done — each antiX VM gets its own LAN IP and accepts SSH.
```