Monthly OpenWrt backup Sun Apr 26 07:44:04 UTC 2026

This commit is contained in:
backup-bot
2026-04-26 07:44:04 +00:00
parent eb39f22291
commit 7d51242962
6 changed files with 186 additions and 0 deletions
+111
View File
@@ -1756,6 +1756,117 @@ protocol bgp {
CFGEOF
# WARNING: /etc/bird4.conf не существует
#Gen file /etc/init.d/y_startup
mkdir -p "/etc/init.d"
cat << 'CFGEOF' > "/etc/init.d/y_startup"
#!/bin/sh /etc/rc.common
# Description: Enable custom route
# Author: Uak
START=90
USE_PROCD=1
EXTRA_COMMANDS="status"
EXTRA_HELP=" status Print Homebridge run information"
is_running() {
pgrep 'customRoute' > /dev/null 2>&1
}
start_service() {
route add -net 172.16.11.0/24 gw 10.0.1.26 metric 1000
#iptables -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
#iptables -t mangle -A POSTROUTING -j TTL --ttl-set 64
#ospf
#ip rule add priority 10 from all lookup 10
#bgp
#ip rule add priority 10 from all lookup 11
#$$echo 64 > /proc/sys/net/ipv4/ip_default_ttl
#$$iptables -t mangle -A POSTROUTING -j TTL --ttl-set 64
#$$iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -m tcpmss --mss 1400:1500 -j TCPMSS --clamp-mss-to-pmtu -o 3g-3g
#iptables -t raw -A PREROUTING -p tcp --dport 1723 -j CT --helper pptp
#$$iptables -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
#activate use routing table 10 (OSPFmy)
ip rule add priority 10 from all lookup 10
#(birdban)
ip rule add priority 10 from all lookup 11
/etc/init.d/mosquitto start
echo 'AT^SYSCFGEX="0302",3fffffff,2,4,7fffffffffffffff,,' | socat - /dev/ttyUSB1,crnl
/etc/init.d/mosquitto start
}
reload_service(){
echo "Restarting customRoute"
stop
start
}
status()
{
if is_running; then
echo "Running"
else
echo "Stopped"
exit 1
fi
}
CFGEOF
#Gen file /etc/rc.local
mkdir -p "/etc"
cat << 'CFGEOF' > "/etc/rc.local"
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
route add -net 172.16.11.0/24 gw 10.0.1.26 metric 1000
ip rule add priority 10 from all lookup 10
#iptables -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
#iptables -t mangle -A POSTROUTING -j TTL --ttl-set 64
#ospf
#ip rule add priority 10 from all lookup 10
#bgp
#ip rule add priority 10 from all lookup 11
echo 64 > /proc/sys/net/ipv4/ip_default_ttl
iptables -t mangle -A POSTROUTING -j TTL --ttl-set 64
iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -m tcpmss --mss 1400:1500 -j TCPMSS --clamp-mss-to-pmtu -o 3g-3g
#iptables -t raw -A PREROUTING -p tcp --dport 1723 -j CT --helper pptp
iptables -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
#activate use routing table 10 (OSPFmy)
ip rule add priority 10 from all lookup 10
#(birdban)
ip rule add priority 10 from all lookup 11
/etc/init.d/mosquitto start
echo 'AT^SYSCFGEX="0302",3fffffff,2,4,7fffffffffffffff,,' | socat - /dev/ttyUSB1,crnl
/etc/init.d/mosquitto start
exit 0
CFGEOF
#----------------------------------------------------
#Generating cron
#----------------------------------------------------