# Wiregaurd proxmox setup (ip-transit)

---

## 📦 Step 1: Install WireGuard

```bash
apt update && apt install wireguard -y
```

---

## 📁 Step 2: Create the WireGuard config



Paste the config that we sent you into `/etc/wireguard/wg0.conf`


---

## 🚀 Step 3: Enable and start WireGuard

```bash
systemctl enable --now wg-quick@wg0
```

---

## 🌐 Step 4: Add routing rules for public IPs

You can run this directly or save as `/root/wg-routes.sh`:

```bash
#!/bin/bash

for ip in {113..117}; do
  ip rule add from 5.231.32.$ip/32 table 11 prio 1
  ip route add 5.231.32.$ip/32 dev vmbr0 table 11
  ip route add 5.231.32.$ip/32 dev vmbr0
done
```

Make it executable:

```bash
chmod +x /root/wg-routes.sh
```

Then run it:

```bash
bash /root/wg-routes.sh
```

---

## 📡 Step 5: Enable IP forwarding and proxy ARP/NDP

You can paste this all at once:

```bash
echo 1 > /proc/sys/net/ipv4/conf/all/proxy_arp
echo 1 > /proc/sys/net/ipv6/conf/default/proxy_ndp
echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
echo "net.ipv6.conf.all.forwarding=1" >> /etc/sysctl.conf
sysctl -p
```

Or add it into the same script above so it runs after reboot.

---

## ✅ Done!

Your public IPs should now route through the WireGuard tunnel.