Skip to content

Instantly share code, notes, and snippets.

@waja
Last active August 10, 2018 12:06
Show Gist options
  • Select an option

  • Save waja/10007453 to your computer and use it in GitHub Desktop.

Select an option

Save waja/10007453 to your computer and use it in GitHub Desktop.
Openwrt x86 installation
# look also at
# http://wiki.openwrt.org/doc/recipes/relayclient
# http://wiki.openwrt.org/doc/recipes/dumbap
# disable dhcp on lan interface (just in case there is a dhcp server running)
uci set dhcp.lan.ignore=1
uci set dhcp.@dnsmasq[0].nonegcache=1
uci commit dhcp
/etc/init.d/dnsmasq restart
# set network config (adjust as your needs)
uci set network.lan.gateway=192.168.10.1
uci set network.lan.dns=8.8.8.8
uci commit network
/etc/init.d/network reload
# rename the router
uci set system.@system[0].hostname=MyRouter
uci commit system
/etc/init.d/system restart
# enable remote logging
uci set system.@system[0].log_ip=192.168.1.2
uci set system.@system[0].conloglevel=7
uci commit system
/etc/init.d/log restart
# disable preinstalled firewall
/etc/init.d/firewall disable && /etc/init.d/firewall stop
# refresh list of available packages
opkg update
# install usb keyboad support
opkg install kmod-usb-hid kmod-hid-generic
# install ipv6 config webinterface part
opkg install luci-proto-ipv6
# install usefull packages
opkg install tcpdump rsync ip
# install webinterface (and QoS Interface)
opkg install luci-mod-admin-full uhttpd libiwinfo-lua luci-app-qos luci-proto-ppp
/etc/init.d/uhttpd enable; /etc/init.d/uhttpd start
# enable network hardware
opkg install kmod-tulip kmod-e1000e; modprobe e1000e; modprobe tulip
# install shorewall
# opkg install shorewall-lite
# install iptables packages
opkg install iptables-mod-conntrack-extra iptables-mod-ipopt iptables-mod-iprange
# optional iptables capabilities
opkg install iptables-mod-filter iptables-mod-iface iptables-mod-ipp2p iptables-mod-ipv4options l7-protocols
# install ipset
opkg install ipset
# here configuration of shorewall needs to be deployed
# maybe look into http://wiki.openwrt.org/doc/recipes/shorewall-on-openwrt
#mkdir -p /etc/shorewall-lite/state/ && touch /etc/shorewall-lite/state/firewall
# Fix broken shorewall-lite Makefile
SBIN=$(which shorewall-lite); sed -i "s#/usr/sbin/shorewall-lite#${SBIN}#g" /etc/shorewall-lite/Makefile
# Fix broken shorewallrc
SBIN=$(which shorewall-lite); SBINDIR=$(dirname ${SBIN}); sed -i s#/usr/sbin#${SBINDIR}#g /usr/share/shorewall/shorewallrc
# enable shorewall
/etc/init.d/shorewall-lite enable
@nv1t
Copy link

nv1t commented Aug 5, 2014

set ip: uci set network.lan.ipaddr='192.168.10.126'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment