Cloud/Shahed/AA: Difference between revisions
Jump to navigation
Jump to search
(3 intermediate revisions by the same user not shown) | |||
Line 88: | Line 88: | ||
ip route | grep default | ip route | grep default | ||
default via 10.19.83.1 dev wlan0 proto dhcp src 10.19.83.68 metric 600 | default via 10.19.83.1 dev wlan0 proto dhcp src 10.19.83.68 metric 600 | ||
---- | |||
{|class="wikitable" | {|class="wikitable" | ||
|- | |- | ||
!scope="col" colspan="4" | Implement | !scope="col" colspan="4" | Implement Forward Routing | ||
|- | |- | ||
!scope="col" style='width:180px'| Name | !scope="col" style='width:180px'| Name | ||
Line 109: | Line 108: | ||
| Network » shahed-an || <code>10.20.40.14/32</code> || <code>10.20.40.14/32 = 1</code> ||style='text-align:center'| ⚪️ | | Network » shahed-an || <code>10.20.40.14/32</code> || <code>10.20.40.14/32 = 1</code> ||style='text-align:center'| ⚪️ | ||
|} | |} | ||
---- | |||
<syntaxhighlight lang="ini"> | |||
cat <<'INI' | sudo tee /etc/systemd/system/warp-route.service >/dev/null | |||
[Unit] | |||
Description=WARP Routes Over LAN | |||
Wants=network-online.target | |||
After=network-online.target | |||
[Service] | |||
Type=oneshot | |||
ExecStartPre=/bin/sleep 15 | |||
ExecStart=/usr/sbin/ip route add 10.20.40.12/32 via 10.19.83.101 | |||
ExecStart=/usr/sbin/ip route add 10.20.40.13/32 via 10.19.83.100 | |||
ExecStop=/usr/sbin/ip route del 10.20.40.12/32 | |||
ExecStop=/usr/sbin/ip route del 10.20.40.13/32 | |||
RemainAfterExit=yes | |||
[Install] | |||
WantedBy=multi-user.target | |||
INI | |||
</syntaxhighlight> | |||
---- | |||
<syntaxhighlight lang="bash"> | |||
cat << EXE | sudo bash | |||
systemctl daemon-reload | |||
cat /etc/systemd/system/warp-route.service | |||
systemctl enable --now warp-route.service | |||
systemctl status warp-route.service | |||
echo && ip route show | |||
echo && sysctl -p | |||
EXE | |||
</syntaxhighlight> | |||
---- | |||
<syntaxhighlight lang="bash"> | |||
cat << EXE | bash | |||
traceroute 10.20.40.12 | |||
traceroute 10.20.40.13 | |||
EXE | |||
</syntaxhighlight> | |||
---- | |||
<syntaxhighlight lang="bash"> | |||
cat << EXE | sudo bash | |||
systemctl daemon-reload | |||
cat /etc/systemd/system/warp-route.service | |||
systemctl disable --now warp-route.service | |||
systemctl status warp-route.service | |||
echo && ip route show | |||
echo && sysctl -p | |||
EXE | |||
</syntaxhighlight> | |||
==References== | ==References== | ||
Line 214: | Line 264: | ||
* [[Helm/MariaDB|Helm » MariaDB]] | * [[Helm/MariaDB|Helm » MariaDB]] | ||
* [[Benchmarks]] | * [[Benchmarks]] | ||
* [[Online App]] | |||
* [[Helm]] | * [[Helm]] | ||
Latest revision as of 19:28, 25 February 2025
SSH
ssh -qt [email protected] bash
cat <<'EXE' | sudo bash
free -th && echo && systemd-analyze && echo
df -h && echo && lsblk && echo
swapon --show
EXE
Cloudflare » VIRT
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.1/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
cat << EXE | sudo bash
systemctl daemon-reload
systemctl enable --now warp0.service
systemctl status warp0.service
EXE
ip a
Cloudflare » Argo » Tunnel
wget -cq https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm64.deb -P ${HOME}/Downloads
sudo dpkg -i ${HOME}/Downloads/cloudflared-linux-arm64.deb; sudo apt install -f
rm -rf ${HOME}/Downloads/cloudflared-linux-arm64.deb
cat <<'SYS' | sudo tee -a /etc/sysctl.conf >/dev/null
###################################################################
# Cloudflared Tunnel Private Network Config
# This config added by Chorke Academia, Inc
# ICMP Group ID Range 0 to 10,000 Users
net.ipv4.ping_group_range = 0 10000
# 208 KiB Default RX Buffer
net.core.rmem_default=212992
# 208 KiB Default TX Buffer
net.core.wmem_default=212992
# 8 MB Maximum RX Buffer
net.core.rmem_max=8388608
# 8 MB Maximum TX Buffer
net.core.wmem_max=8388608
SYS
sudo sysctl -p
Cloudflare » WARP » Forward
sudo vim /etc/sysctl.conf
# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1
sudo sysctl -p net.ipv4.ip_forward = 1 ip route | grep default default via 10.19.83.1 dev wlan0 proto dhcp src 10.19.83.68 metric 600
Implement Forward Routing | |||
---|---|---|---|
Name | Network | Subnets | Forward |
Network » shahed-aj | 10.20.40.10/32 |
10.20.40.10/32 = 1 |
⚪️ |
Network » shahed-ak | 10.20.40.11/32 |
10.20.40.11/32 = 1 |
⚪️ |
Network » shahed-al | 10.20.40.12/32 |
10.20.40.12/32 = 1 |
✅ |
Network » shahed-am | 10.20.40.13/32 |
10.20.40.13/32 = 1 |
✅ |
Network » shahed-an | 10.20.40.14/32 |
10.20.40.14/32 = 1 |
⚪️ |
cat <<'INI' | sudo tee /etc/systemd/system/warp-route.service >/dev/null
[Unit]
Description=WARP Routes Over LAN
Wants=network-online.target
After=network-online.target
[Service]
Type=oneshot
ExecStartPre=/bin/sleep 15
ExecStart=/usr/sbin/ip route add 10.20.40.12/32 via 10.19.83.101
ExecStart=/usr/sbin/ip route add 10.20.40.13/32 via 10.19.83.100
ExecStop=/usr/sbin/ip route del 10.20.40.12/32
ExecStop=/usr/sbin/ip route del 10.20.40.13/32
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
INI
cat << EXE | sudo bash
systemctl daemon-reload
cat /etc/systemd/system/warp-route.service
systemctl enable --now warp-route.service
systemctl status warp-route.service
echo && ip route show
echo && sysctl -p
EXE
cat << EXE | bash
traceroute 10.20.40.12
traceroute 10.20.40.13
EXE
cat << EXE | sudo bash
systemctl daemon-reload
cat /etc/systemd/system/warp-route.service
systemctl disable --now warp-route.service
systemctl status warp-route.service
echo && ip route show
echo && sysctl -p
EXE
References
| ||
| ||
| ||