Last active 6 months ago

Revision 5419fd0c48d950f364b3c3b9820d2ce93e43081a

openwrt_x86.install Raw
1# look also at
2# http://wiki.openwrt.org/doc/recipes/relayclient
3# http://wiki.openwrt.org/doc/recipes/dumbap
4
5# disable dhcp on lan interface (just in case there is a dhcp server running)
6uci set dhcp.lan.ignore=1
7uci commit dhcp
8/etc/init.d/dnsmasq restart
9
10# set network config (adjust as your needs)
11uci set network.lan.gateway=192.168.10.1
12uci set network.lan.dns=8.8.8.8
13uci commit network
14/etc/init.d/network reload
15
16# rename the router
17uci set system.@system[0].hostname=MyRouter
18uci commit system
19/etc/init.d/system restart
20
21# enable remote logging
22uci set system.@system[0].log_ip=192.168.1.2
23uci set system.@system[0].conloglevel=7
24uci commit system
25/etc/init.d/log restart
26
27# disable preinstalled firewall
28/etc/init.d/firewall disable && /etc/init.d/firewall stop
29
30# refresh list of available packages
31opkg update
32
33# install usb keyboad support
34opkg install kmod-usb-hid kmod-hid-generic
35
36# install webinterface
37opkg install luci-mod-admin-full luci-theme-openwrt uhttpd libiwinfo-lua
38/etc/init.d/uhttpd enable && /etc/init.d/uhttpd start
39
40# enable network hardware
41opkg install kmod-tulip kmod-e1000e; modprobe e1000e; modprobe tulip
42
43# install shorewall
44opkg install shorewall-lite iptables-mod-conntrack-extra iptables-mod-ipopt iptables-mod-iprange
45# optional iptables capabilities
46opkg install iptables-mod-filter iptables-mod-iface iptables-mod-ipp2p iptables-mod-ipv4options l7-protocols
47
48# here configuration of shorewall needs to be deployed
49# maybe look into http://wiki.openwrt.org/doc/recipes/shorewall-on-openwrt
50#mkdir -p /etc/shorewall-lite/state/ && touch /etc/shorewall-lite/state/firewall
51
52# Fix broken shorewall-lite Makefile
53SBIN=$(which shorewall-lite); sed -i "s#/usr/sbin/shorewall-lite#${SBIN}#g" /etc/shorewall-lite/Makefile
54# Fix broken shorewallrc
55SBIN=$(which shorewall-lite); SBINDIR=$(dirname ${SBIN}); sed -i s#/usr/sbin#${SBINDIR}#g /usr/share/shorewall/shorewallrc
56# enable shorewall
57/etc/init.d/shorewall-lite enable