Monthly OpenWrt backup Sun Apr 26 07:44:04 UTC 2026
This commit is contained in:
@@ -769,6 +769,25 @@ protocol bgp {
|
||||
CFGEOF
|
||||
|
||||
# WARNING: /etc/bird4.conf не существует
|
||||
# WARNING: /etc/init.d/y_startup не существует
|
||||
#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.
|
||||
iptables -t mangle -A PREROUTING -i wan -j TTL --ttl-inc 1
|
||||
iptables -t mangle -A PREROUTING -i pptp-inet -j TTL --ttl-inc 1
|
||||
|
||||
|
||||
#use routing table 10 (OSPFmy)
|
||||
ip rule add priority 10 from all lookup 10
|
||||
#(birdban)
|
||||
ip rule add priority 10 from all lookup 11
|
||||
|
||||
exit 0
|
||||
CFGEOF
|
||||
|
||||
#----------------------------------------------------
|
||||
#Generating cron
|
||||
#----------------------------------------------------
|
||||
|
||||
@@ -1401,6 +1401,17 @@ CFGEOF
|
||||
|
||||
# WARNING: /etc/bird.conf не существует
|
||||
# WARNING: /etc/bird4.conf не существует
|
||||
# WARNING: /etc/init.d/y_startup не существует
|
||||
#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.
|
||||
|
||||
exit 0
|
||||
CFGEOF
|
||||
|
||||
#----------------------------------------------------
|
||||
#Generating cron
|
||||
#----------------------------------------------------
|
||||
|
||||
@@ -2335,6 +2335,17 @@ CFGEOF
|
||||
|
||||
# WARNING: /etc/bird.conf не существует
|
||||
# WARNING: /etc/bird4.conf не существует
|
||||
# WARNING: /etc/init.d/y_startup не существует
|
||||
#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.
|
||||
|
||||
exit 0
|
||||
CFGEOF
|
||||
|
||||
#----------------------------------------------------
|
||||
#Generating cron
|
||||
#----------------------------------------------------
|
||||
|
||||
@@ -2231,6 +2231,17 @@ CFGEOF
|
||||
|
||||
# WARNING: /etc/bird.conf не существует
|
||||
# WARNING: /etc/bird4.conf не существует
|
||||
# WARNING: /etc/init.d/y_startup не существует
|
||||
#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.
|
||||
|
||||
exit 0
|
||||
CFGEOF
|
||||
|
||||
#----------------------------------------------------
|
||||
#Generating cron
|
||||
#----------------------------------------------------
|
||||
|
||||
@@ -687,6 +687,29 @@ protocol bgp {
|
||||
}
|
||||
CFGEOF
|
||||
|
||||
# WARNING: /etc/init.d/y_startup не существует
|
||||
#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.
|
||||
|
||||
#for pptp
|
||||
#opkg install pptpd kmod-nf-nathelper-extra
|
||||
#iptables -t raw -A PREROUTING -p tcp --dport 1723 -j CT --helper pptp
|
||||
|
||||
# fot sync mtu diff
|
||||
iptables -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
|
||||
|
||||
exit 0
|
||||
CFGEOF
|
||||
|
||||
#----------------------------------------------------
|
||||
#Generating cron
|
||||
#----------------------------------------------------
|
||||
|
||||
@@ -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
|
||||
#----------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user