Skip to content

Instantly share code, notes, and snippets.

@rochmad
rochmad / gist:60e84595e22c668fb1836800e1bef40c
Created December 17, 2020 05:25
OPENWRT : flood DHCP packet received on vlan0 which has no address
##logread -f
Thu Oct 29 21:40:19 2020 daemon.warn dnsmasq-dhcp[3415]: DHCP packet received on vlan0 which has no address
Thu Oct 29 21:40:21 2020 daemon.warn dnsmasq-dhcp[3415]: DHCP packet received on vlan1 which has no address
Thu Oct 29 21:40:23 2020 daemon.warn dnsmasq-dhcp[3415]: DHCP packet received on vlan2 which has no address
##solution
add into file /etc/config/dhcp
```list 'notinterface' 'vlan0, vlan1, vlan2'```
@rochmad
rochmad / dohinstall.sh
Last active November 18, 2020 11:55
install DoH only on Raspberry 1 model B+
#install golang
export GOLANG="$(curl https://golang.org/dl/|grep armv6l|grep -v beta|head -1|awk -F\> {'print $3'}|awk -F\< {'print $1'})"
wget https://golang.org/dl/$GOLANG
sudo tar -C /usr/local -xzf $GOLANG
rm $GOLANG
unset GOLANG
#install DoH
git clone https://github.com/m13253/dns-over-https.git
cd dns-over-https
@rochmad
rochmad / huaweimonitor.py
Created November 15, 2020 06:26
Huawei E5372(Bolt) signal and speed monitor
#!/usr/bin/python3
#for
#pip install huawei-lte-api
from huawei_lte_api.Client import Client
from huawei_lte_api.AuthorizedConnection import AuthorizedConnection
from huawei_lte_api.Connection import Connection
from reprint import output
import time
@rochmad
rochmad / INSTALL 4 FFMPEG WITH NVEC
Last active August 8, 2019 06:30
INSTALL FFMPEG 4 WITH NVEC
https://gist.github.com/AlexanderC/3986104
https://developer.nvidia.com/ffmpeg
https://ntown.at/de/knowledgebase/cuda-gpu-accelerated-h264-h265-hevc-video-encoding-with-ffmpeg/
https://arstech.net/ffmpeg-gpu-transcoding-examples/
------------
# INSTALL FFMPEG WITH NVEC
https://developer.nvidia.com/ffmpeg
wget -q -O- https://downloads.opennebula.org/repo/repo.key | sudo apt-key add - && \
echo "deb https://downloads.opennebula.org/repo/5.6/Ubuntu/18.04 stable opennebula" | sudo tee /etc/apt/sources.list.d/opennebula.list && \
sudo apt update && \
sudo apt install opennebula opennebula-sunstone opennebula-gate opennebula-flow opennebula-node -f -y && \
sudo /usr/share/one/install_gems && \
cat /var/lib/one/.one/one_auth && \
echo "oneadmin:admin" > /home/oneadmin/.one/one_auth && \
systemctl start opennebula opennebula-sunstone && \
systemctl enable opennebula opennebula-sunstone
@rochmad
rochmad / gist:82abe4bca64a5a835ee0e6a019ec4765
Created July 16, 2018 06:23
Hashes of expected file debian 9
sudo rm -rf /var/lib/apt/lists/partial
227 sudo apt-get update -o Acquire::CompressionTypes::Order::=gz
install browsh in debian / ubuntu, with source mode
(links replacement)
download firefox esr on download page
https://www.mozilla.org/en-US/firefox/organizations/all/
find dowload linux 64 or 32 bit, depends on system architecture
example:
# wget -4 https://download-installer.cdn.mozilla.net/pub/firefox/releases/60.1.0esr/linux-x86_64/en-US/firefox-60.1.0esr.tar.bz2
@rochmad
rochmad / GIT update vulnerability CVE-2018-11233 and CVE-2018-11235
Last active June 4, 2018 03:24
BUG GIT, (CVE-2018-11233 and CVE-2018-11235)
Vulnerable GIT:
before 2.17.1,
GIT GIT 2.17
before 2.16.4,
GIT GIT 2.16.3
GIT GIT 2.16
before 2.15.2
GIT GIT 2.15.1
GIT GIT 2.15
before 2.14.4
@rochmad
rochmad / Mikrotik_SSTP_VPN_with_Singed_Certificates_Comodo_SSL_CRL_Enable
Created May 16, 2018 07:01
Mikrotik SSTP VPN with Singed Certificates Comodo SSL, CRL Enable
https://wiki.mikrotik.com/wiki/Manual:Interface/SSTP
how to enable SSTP with Comodo SSL,
first generate like normaly,
and you will get
crt in pk8 format, and convert it to crt,
and then import to mikrotik server,
key from generate, and crt,
@rochmad
rochmad / unifi_5.7_16.04_LTS
Last active November 4, 2018 18:29
install unifi 5.7 + mongo db 3.2 + java 8 + 16.04 LTS / debian 8
install unifi 5.7 + mongo db 3.0.x + java 8 + 16.04 LTS / debian 8
install java 8 oracle
sudo echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list
sudo echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
sudo apt-get update &&
apt-get install oracle-java8-installer
#check java