Skip to content

Instantly share code, notes, and snippets.

@sevkin
Last active December 8, 2018 20:22
Show Gist options
  • Save sevkin/47d523f7cf021feee05ce6f6e5def609 to your computer and use it in GitHub Desktop.
Save sevkin/47d523f7cf021feee05ce6f6e5def609 to your computer and use it in GitHub Desktop.
openwrt router + usb_ether modem
# luci > net > firewall > custom_rules
#
# add modem (eth1) to lan bridge
#
# drop modem dhcp (modem is static 192.168.1.2)
iptables -A input_lan_rule -p udp --src 192.168.1.2 --destination-port 68 -j DROP
iptables -A forwarding_lan_rule -p udp --src 192.168.1.2 --destination-port 68 -j DROP
opkg update
opkg install kmod-usb-net-huawei-cdc-ncm kmod-usb-net-cdc-ether usb-modeswitch
# https://hackaday.io/page/1984-openwrt-bridge-firewalling
opkg install kmod-ipt-extra kmod-br-netfilter
# kmod-ipt-extra works with lede 17 ???
# kmod-br-netfilter works with openwrt 18.06
# /etc/sysctl.d/local.conf
# https://toster.ru/q/29447
net.bridge.bridge-nf-call-iptables=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment