openwrt: port files dir to flukso v2

This commit is contained in:
Bart Van Der Meerssche 2010-12-19 20:53:54 +01:00
parent b12a52ae87
commit b99af29cbd
15 changed files with 332 additions and 11 deletions

View File

@ -0,0 +1,14 @@
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">Flukso RESTful API on %h</name>
<service>
<type>_flukso._tcp</type>
<port>8080</port>
<txt-record>id1=0123456789abcdef0123456789abcde0</txt-record>
<txt-record>id2=0123456789abcdef0123456789abcde1</txt-record>
<txt-record>id3=0123456789abcdef0123456789abcde2</txt-record>
<txt-record>path=/sensor</txt-record>
<txt-record>version=1.0</txt-record>
</service>
</service-group>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">Web Server on %h</name>
<service>
<type>_http._tcp</type>
<port>80</port>
<txt-record>path=/</txt-record>
</service>
</service-group>

View File

@ -0,0 +1,23 @@
config dnsmasq
option domainneeded 1
option boguspriv 1
option filterwin2k '0' #enable for dial on demand
option localise_queries 1
option local '/lan/'
option domain 'home'
option expandhosts 1
option nonegcache 0
option authoritative 1
option readethers 1
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.auto'
config dhcp
option interface lan
option start 100
option limit 150
option leasetime 12h
config dhcp
option interface wan
option ignore 1

View File

@ -0,0 +1,3 @@
config dropbear
option PasswordAuth 'on'
option Port '22'

View File

@ -0,0 +1,87 @@
config defaults
option syn_flood 1
option input ACCEPT
option output ACCEPT
option forward REJECT
config zone
option name lan
option input ACCEPT
option output ACCEPT
option forward REJECT
config zone
option name wan
option input REJECT
option output ACCEPT
option forward REJECT
option masq 1
config forwarding
option src lan
option dest wan
## Enable this option if you encounter any MTU problems
## e.g. some websites work, others do not, submitting
## forms causes problems, ...
# option mtu_fix 1
### EXAMPLE CONFIG SECTIONS
# do not allow a specific ip to access wan
#config rule
# option src lan
# option src_ip 192.168.45.2
# option dest wan
# option proto tcp
# option target REJECT
# block a specific mac on wan
#config rule
# option dest wan
# option src_mac 00:11:22:33:44:66
# option target REJECT
# block incoming ICMP traffic on a zone
#config rule
# option src lan
# option proto ICMP
# option target DROP
# port redirect port coming in on wan to lan
#config redirect
# option src wan
# option src_dport 80
# option dest lan
# option dest_ip 192.168.16.235
# option dest_port 80
# option proto tcp
# include a file with users custom iptables rules
config include
option path /etc/firewall.user
### FULL CONFIG SECTIONS
#config rule
# option src lan
# option src lan
# option src_ip 192.168.45.2
# option src_mac 00:11:22:33:44:55
# option src_port 80
# option dest wan
# option dest_ip 194.25.2.129
# option dest_port 120
# option proto tcp
# option target REJECT
#config redirect
# option src lan
# option src_ip 192.168.45.2
# option src_mac 00:11:22:33:44:55
# option src_port 1024
# option src_dport 80
# option dest_ip 194.25.2.129
# option dest_port 120
# option proto tcp

View File

@ -0,0 +1,17 @@
# Copyright (C) 2006 OpenWrt.org
config interface loopback
option ifname lo
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0
config interface wan
option ifname ath0
option proto dhcp
config interface lan
option ifname eth0
option proto static
option ipaddr 192.168.255.1
option netmask 255.255.255.0

View File

@ -1,6 +1,9 @@
config system
option hostname flukso
option timezone UTC
option hostname flukso
option device 0123456789abcdef0123456789abcdef
option key 00112233445566778899aabbccddeeff
option version 210
config button
option button reset

View File

@ -0,0 +1,83 @@
# Server configuration
config uhttpd main
# HTTP listen addresses, multiple allowed
list listen_http 0.0.0.0:80
# list listen_http [::]:80
# HTTPS listen addresses, multiple allowed
# list listen_https 0.0.0.0:443
# list listen_https [::]:443
# Server document root
option home /www
# Reject requests from RFC1918 IP addresses
# directed to the servers public IP(s).
# This is a DNS rebinding countermeasure.
option rfc1918_filter 1
# Certificate and private key for HTTPS.
# If no listen_https addresses are given,
# the key options are ignored.
option cert /etc/uhttpd.crt
option key /etc/uhttpd.key
# CGI url prefix, will be searched in docroot.
# Default is /cgi-bin
option cgi_prefix /cgi-bin
# List of extension->interpreter mappings.
# Files with an associated interpreter can
# be called outside of the CGI prefix and do
# not need to be executable.
# list interpreter ".php=/usr/bin/php-cgi"
# list interpreter ".cgi=/usr/bin/perl"
# Lua url prefix and handler script.
# Lua support is disabled if no prefix given.
# option lua_prefix /luci
# option lua_handler /usr/lib/lua/luci/sgi/uhttpd.lua
# CGI/Lua timeout, if the called script does not
# write data within the given amount of seconds,
# the server will terminate the request with
# 504 Gateway Timeout response.
option script_timeout 60
# Network timeout, if the current connection is
# blocked for the specified amount of seconds,
# the server will terminate the associated
# request process.
option network_timeout 30
# Basic auth realm, defaults to local hostname
# option realm OpenWrt
# Configuration file in busybox httpd format
# option config /etc/httpd.conf
config uhttpd restful
list listen_http 0.0.0.0:8080
option home /www
option cgi_prefix /sensor
option script_timeout 5
option network_timeout 5
# Certificate defaults for px5g key generator
config cert px5g
# Validity time
option days 730
# RSA key size
option bits 1024
# Location
option country DE
option state Berlin
option location Berlin
# Common name
option commonname OpenWrt

View File

@ -0,0 +1,18 @@
config wifi-device wifi0
option type atheros
option channel auto
option mode 11bg
option diversity 0
option txantenna 1
option rxantenna 1
option disabled 0
config wifi-iface
option device wifi0
option network wan
option mode sta
option nosbeacon 1
option hidden 0
option ssid zwaluw
option encryption wep
option key 4ae56b7820f6b6b3cba78da46b

View File

@ -0,0 +1,2 @@
127.0.0.1 localhost
192.168.255.1 flukso

View File

@ -0,0 +1,2 @@
::sysinit:/etc/init.d/rcS S boot
::shutdown:/etc/init.d/rcS K stop

View File

@ -0,0 +1,3 @@
root:$1$VtdkJasi$HdGYp/XcbJmQ3BInhA/ki/:0:0:root:/root:/bin/ash
nobody:*:65534:65534:nobody:/var:/bin/false
daemon:*:65534:65534:daemon:/var:/bin/false

View File

@ -0,0 +1,7 @@
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
# set the wifi led pin (=GPIO 7) direction to output
gpioctl dirout 7
exit 0

View File

@ -0,0 +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FUQK/I8ois1ATT1rGAiqrkDZIm4pdDmqB/zLI3qIJf8o
cKIo2x/YkVhuDmIpU/XVA13csXrXU+CLfFyNdY1a/6Dhv2B4wG6J5RGuxWmA+Igg
TTysD+aqqzs8XstqDu/aLjMzFKMaXNvDoCbdFQGVXfx0F1A=
-----END CERTIFICATE-----

View File

@ -0,0 +1,28 @@
kernel.panic=3
net.ipv4.conf.default.arp_ignore=1
net.ipv4.conf.all.arp_ignore=1
net.ipv4.ip_forward=1
net.ipv4.icmp_echo_ignore_broadcasts=1
net.ipv4.icmp_ignore_bogus_error_responses=1
net.ipv4.tcp_ecn=0
net.ipv4.tcp_fin_timeout=30
net.ipv4.tcp_keepalive_time=120
net.ipv4.tcp_syncookies=1
net.ipv4.tcp_timestamps=0
net.core.netdev_max_backlog=30
net.netfilter.nf_conntrack_checksum=0
net.ipv4.netfilter.ip_conntrack_checksum=0
net.ipv4.netfilter.ip_conntrack_max=16384
net.ipv4.netfilter.ip_conntrack_tcp_timeout_established=3600
net.ipv4.netfilter.ip_conntrack_udp_timeout=60
net.ipv4.netfilter.ip_conntrack_udp_timeout_stream=180
# net.ipv6.conf.all.forwarding=1
# disable bridge firewalling by default
net.bridge.bridge-nf-call-arptables=0
net.bridge.bridge-nf-call-ip6tables=0
net.bridge.bridge-nf-call-iptables=0
# blink the wifi led (= GPIO7)
dev.wifi0.softled=1
dev.wifi0.ledpin=7