Última actividad 6 months ago

Revisión 566b0e9d3cc840561419107ea4424fe921d27806

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