Skip to content

Instantly share code, notes, and snippets.

@odevodyssey
odevodyssey / conmon.sh
Created February 27, 2024 12:55
Scripts to monitor cellular connection for 4G LTE RPi on OpenWrt
#!/bin/sh
# Internet Monitoring Script for QMI Modem
# Modem: Quectel EG25-G
# Script inspired from conmon.sh in ROOter project.
# https://www.ofmodemsandmen.com/
# What is most likely to happen in my experience is modem gets a new IP from ISP, randomly, and interface does not update, therefore outbound traffic stops
# This script will cover both scenarios
@odevodyssey
odevodyssey / config.txt
Created December 19, 2022 01:05
OpenWrt Custom Hotspot
################################################################################
# Bootloader configuration - config.txt
################################################################################
################################################################################
# For overclocking and various other settings, see:
# https://www.raspberrypi.org/documentation/configuration/config-txt/README.md
################################################################################
# OpenWrt config
@odevodyssey
odevodyssey / privoxy
Created November 2, 2022 12:48
Privoxy Sample Configuration - Forwarding (HTTP and SOCKS) on OpenWrt
# /etc/config/privoxy
# replace username and password with proxy provided credentials
config privoxy 'privoxy'
option confdir '/etc/privoxy'
option logdir '/var/log'
option logfile 'privoxy.log'
list filterfile 'default.filter'
list actionsfile 'match-all.action'
@odevodyssey
odevodyssey / firewall
Created September 26, 2022 01:41
Site to Site VPN Config - Site A
# /etc/config/firewall
config defaults
option input 'ACCEPT'
option output 'ACCEPT'
option synflood_protect '1'
option forward 'REJECT'
config zone
@odevodyssey
odevodyssey / firewall
Created September 26, 2022 01:29
Site to Site VPN Config - Site B
# /etc/config/firewall
config defaults
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
option synflood_protect '1'
config zone
option name 'lan'
@odevodyssey
odevodyssey / config.txt
Created June 17, 2022 18:48
OpenWrt USB OTG Ethernet Setup
################################################################################
# Bootloader configuration - config.txt
################################################################################
################################################################################
# For overclocking and various other settings, see:
# https://www.raspberrypi.org/documentation/configuration/config-txt/README.md
################################################################################
# OpenWrt config
@odevodyssey
odevodyssey / config.txt
Last active June 17, 2022 18:46
OpenWrt USB OTG Serial And Ethernet Setup
################################################################################
# Bootloader configuration - config.txt
################################################################################
################################################################################
# For overclocking and various other settings, see:
# https://www.raspberrypi.org/documentation/configuration/config-txt/README.md
################################################################################
# OpenWrt config
@odevodyssey
odevodyssey / config.txt
Created June 17, 2022 18:39
OpenWrt USB OTG Serial Setup
################################################################################
# Bootloader configuration - config.txt
################################################################################
################################################################################
# For overclocking and various other settings, see:
# https://www.raspberrypi.org/documentation/configuration/config-txt/README.md
################################################################################
# OpenWrt config
@odevodyssey
odevodyssey / network
Created April 11, 2022 17:21
4G LTE Network Config OpenWrt for Raspberry Pi 4B
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fdf7:1fbd:8cd0::/48'
config device
@odevodyssey
odevodyssey / .config
Created April 11, 2022 15:55
4G LTE Cellular OpenWrt Build Image Config for Raspberry Pi 4B
#
# Automatically generated file; DO NOT EDIT.
# OpenWrt Configuration
#
CONFIG_MODULES=y
CONFIG_HAVE_DOT_CONFIG=y
# CONFIG_TARGET_sunxi is not set
# CONFIG_TARGET_apm821xx is not set
# CONFIG_TARGET_ath25 is not set
# CONFIG_TARGET_ath79 is not set