Cloud/Shahed/VA: Difference between revisions
Jump to navigation
Jump to search
Line 40: | Line 40: | ||
cat <<'EXE'| lxc exec shahed-va -- bash | cat <<'EXE'| lxc exec shahed-va -- bash | ||
free -th && echo && systemd-analyze && echo && df -h | free -th && echo && systemd-analyze && echo && df -h | ||
EXE | |||
</syntaxhighlight> | |||
==Virtual » Cloudflare » VIRT== | |||
<syntaxhighlight lang="ini"> | |||
cat <<'EXE'| lxc exec shahed-va -- bash | |||
cat <<'INI'| sudo tee /etc/systemd/system/warp0.service >/dev/null | |||
[Unit] | |||
Description=Cloudflared WARP Routing Virtual Interface | |||
After=network.target | |||
[Service] | |||
Type=oneshot | |||
ExecStart=/usr/sbin/ip link add warp0 type dummy | |||
ExecStartPost=/usr/sbin/ip addr add 10.20.40.200/32 dev warp0 | |||
ExecStartPost=/usr/sbin/ip link set warp0 up | |||
ExecStop=/usr/sbin/ip link delete warp0 | |||
RemainAfterExit=yes | |||
[Install] | |||
WantedBy=multi-user.target | |||
INI | |||
echo | |||
ls -lah /etc/systemd/system/warp0.service && echo | |||
cat /etc/systemd/system/warp0.service && echo | |||
EXE | |||
</syntaxhighlight> | |||
---- | |||
<syntaxhighlight lang="bash"> | |||
cat <<'EXE'| lxc exec shahed-va -- bash | |||
systemctl daemon-reload | |||
systemctl enable --now warp0.service | |||
systemctl status warp0.service | |||
ip a | |||
EXE | EXE | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 22:53, 2 March 2025
Virtual » Network
Virtual Instances | |||
---|---|---|---|
Name | Network | Subnets | Forward |
Virtual » Hosts | 10.20.40.200/29 |
10.20.40.200 … 207/32 = 08 |
✅ |
Virtual » Hosts | 10.20.40.208/29 |
10.20.40.208 … 215/32 = 08 |
⚪️ |
Virtual » Hosts | 10.20.40.208/28 |
10.20.40.208 … 223/32 = 16 |
✅ |
Virtual » Hosts | 10.20.40.224/28 |
10.20.40.224 … 239/32 = 16 |
⚪️ |
Virtual » Hosts | 10.20.40.224/31 |
10.20.40.224 … 225/32 = 02 |
✅ |
Virtual » Hosts | 10.20.48.226/31 |
10.20.40.226 … 227/32 = 02 |
⚪️ |
Virtual » Instance
lxc launch ubuntu:24.04 shahed-va -c limits.memory=2GB -c limits.cpu=2
lxc list -c=n -f=json|jq -r '.[]|select(.name=="shahed-va")|.status'
lxc config show shahed-va
cat <<'EXE'| lxc exec shahed-va -- bash
apt-get update;echo
mkdir -p /etc/apt/keyrings
apt list -a --upgradable;apt-get upgrade -y;echo
apt-get install -y apt-transport-https ca-certificates gnupg jq && apt-get clean
EXE
Virtual » Exec » Bash
cat <<'EXE'| lxc exec shahed-va -- bash
free -th && echo && systemd-analyze && echo && df -h
EXE
Virtual » Cloudflare » VIRT
cat <<'EXE'| lxc exec shahed-va -- bash
cat <<'INI'| sudo tee /etc/systemd/system/warp0.service >/dev/null
[Unit]
Description=Cloudflared WARP Routing Virtual Interface
After=network.target
[Service]
Type=oneshot
ExecStart=/usr/sbin/ip link add warp0 type dummy
ExecStartPost=/usr/sbin/ip addr add 10.20.40.200/32 dev warp0
ExecStartPost=/usr/sbin/ip link set warp0 up
ExecStop=/usr/sbin/ip link delete warp0
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
INI
echo
ls -lah /etc/systemd/system/warp0.service && echo
cat /etc/systemd/system/warp0.service && echo
EXE
cat <<'EXE'| lxc exec shahed-va -- bash
systemctl daemon-reload
systemctl enable --now warp0.service
systemctl status warp0.service
ip a
EXE
References
| ||
| ||
| ||