Utoljára aktív 6 months ago

Revízió 0584c1473801f7464dfc8fe0ca8dd471eb27c916

openwrt_x86.install Eredeti
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 webinterface (and QoS Interface)
38opkg install luci-mod-admin-full luci-theme-openwrt uhttpd libiwinfo-lua luci-app-qos luci-proto-ppp
39/etc/init.d/uhttpd enable && /etc/init.d/uhttpd start
40
41# enable network hardware
42opkg install kmod-tulip kmod-e1000e; modprobe e1000e; modprobe tulip
43
44# install shorewall
45opkg install shorewall-lite iptables-mod-conntrack-extra iptables-mod-ipopt iptables-mod-iprange
46# optional iptables capabilities
47opkg install iptables-mod-filter iptables-mod-iface iptables-mod-ipp2p iptables-mod-ipv4options l7-protocols
48
49# here configuration of shorewall needs to be deployed
50# maybe look into http://wiki.openwrt.org/doc/recipes/shorewall-on-openwrt
51#mkdir -p /etc/shorewall-lite/state/ && touch /etc/shorewall-lite/state/firewall
52
53# Fix broken shorewall-lite Makefile
54SBIN=$(which shorewall-lite); sed -i "s#/usr/sbin/shorewall-lite#${SBIN}#g" /etc/shorewall-lite/Makefile
55# Fix broken shorewallrc
56SBIN=$(which shorewall-lite); SBINDIR=$(dirname ${SBIN}); sed -i s#/usr/sbin#${SBINDIR}#g /usr/share/shorewall/shorewallrc
57# enable shorewall
58/etc/init.d/shorewall-lite enable