Skip to content

Instantly share code, notes, and snippets.

View cli network port tests
######
function _port_test (){
cat < /dev/null > /dev/tcp/$1/$2
return $?
}
function port_test (){
View wget splunkforwarder
wget -O splunkforwarder-8.0.0-1357bef0a7f6-Linux-x86_64.tgz 'https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64&platform=linux&version=8.0.0&product=universalforwarder&filename=splunkforwarder-8.0.0-1357bef0a7f6-Linux-x86_64.tgz&wget=true'
wget -O splunkforwarder-8.0.1-6db836e2fb9e-Linux-x86_64.tgz 'https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64&platform=linux&version=8.0.1&product=universalforwarder&filename=splunkforwarder-8.0.1-6db836e2fb9e-Linux-x86_64.tgz&wget=true'
wget -O splunk-8.0.0-1357bef0a7f6-Linux-x86_64.tgz 'https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64&platform=linux&version=8.0.0&product=splunk&filename=splunk-8.0.0-1357bef0a7f6-Linux-x86_64.tgz&wget=true'
# 8.0.1
wget -O splunk-8.0.1-6db836e2fb9e-Linux-x86_64.tgz 'https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64&platform=linux&version=8.0.1&product=splunk&filename=splunk-8.0.1-6db836e2fb9e-Linux-x86_64.tgz&wget=true'
View config
apiVersion: v1
clusters:
- cluster:
server: http://172.17.0.1:4321
name: cloudshell
contexts:
- context:
cluster: cloudshell
user: cloudshell
name: cloudshell
View asus_streamin_blocking.sh
# 0 to disable filtering
# 1 to enable
action=1
src_mac=1C:1B:0D:0B:53:49
nv=`nvram show 2>/dev/null| grep wrs_rulelist=|sed "s/[01]>$src_mac>/$action>$src_mac>/g"`
nvram set $nv
nv=`nvram show 2>/dev/null| grep wrs_app_rulelist=|sed "s/[01]>$src_mac>/$action>$src_mac>/g"`
nvram set $nv
rc rc_service restart_wrs