Skip to content

Instantly share code, notes, and snippets.

ECHO() {
echo "$1" >> /tmp/iface.log
}
main() {
ECHO "========================================"
ECHO "DEVICE=$DEVICE"
ECHO "INTERFACE=$INTERFACE"
ECHO "ACTION=$ACTION"
@dan82840
dan82840 / Topology
Last active July 19, 2021 14:19
Debug Log for ebtables, iptables and tc
(enp0s9)[QOSL1](enp0s8) -- (intnet-1) -- (enp0s8)[QoS-Router](enp0s3)
+---- (enp0s3) +
+-- (br0) --+-- (enp0s9) -- (intnet-2) -- (enp0s8)[QOSR1](enp0s3)
+-- (enp0s10) --(intnet-3) -- (enp0s8)[QOSR2](enp0s3)
@dan82840
dan82840 / test-oap-state.sh
Last active August 15, 2018 09:36
test-oap-state.sh
#!/bin/sh
#
. /lib/oap/uci.sh
_foreach_wifi_iface_cb() {
local section=$1
local ifname=$(oap_state_get wireless.$section.ifname)
local ssid=$(oap_state_get wireless.$section.ssid)
#!/bin/sh
#
for i in $(ip6tables -S | awk '{print $2}' | uniq); do
ip6tables -F $i
ip6tables -Z $i
ip6tables -X $i
done
ip6tables -F INPUT
#!/bin/sh
#
# ping-via-gateway.sh [Destination IP Address] [Default Gateway IP Address] [Output Interface Name]
#
SRC_IP=
DST_IP=$1
DEFAULT_GW=$2
OUT_INF=$3
#!/bin/sh
#
# Apple OUI = D8:96:95
BASE="d8:96:95:08:97"
FROM=$1
TO=$2
if [ -e $FROM ]; then FROM=1; fi
if [ -e $TO ]; then TO=1; fi
#!/bin/sh
#
# test-uci-set-commit.sh [config name] [number of entry]
#
usage() {
echo "test-uci-set-commit.sh [config name] [number of entry]"
}
# $1: argc
#!/bin/sh
#
VERSION=2.60.3
## Use port 8080 to connect, 10.5.1.101 company DNS server
docker run -d \
-p 8080:8080 -p 50000:50000 \
--name=jenkins-$VERSION \
--restart always \
#!/bin/sh
#
## Use port 8080 to connect, 10.5.1.101 company DNS server
docker run -d \
-p 8080:8080 -p 50000:50000 \
--name=jenkins-2.7.3 \
--dns=10.5.1.101 \
-v /etc/timezone:/etc/timezone:ro \
-v /etc/localtime:/etc/localtime:ro \
#!/bin/sh
#
REPO_URL=$1
CNAME=$2
PNAME=$3
LATES_TAG=
[ "REPO_URL" == "" ] && {