Initial check-in of the public branch from my private repo
authorSven Hoexter <sven@timegate.de>
Fri, 14 Jan 2011 20:19:55 +0000 (21:19 +0100)
committerSven Hoexter <sven@timegate.de>
Fri, 14 Jan 2011 20:19:55 +0000 (21:19 +0100)
aiccu.conf [new file with mode: 0644]
config/ip6.startup [new file with mode: 0755]
config/rootprofile.startup [new file with mode: 0755]
config/sixxs.ipup [new file with mode: 0755]
filters6.sh [new file with mode: 0755]
init.d/aiccu [new file with mode: 0755]
radvd.conf [new file with mode: 0644]

diff --git a/aiccu.conf b/aiccu.conf
new file mode 100644 (file)
index 0000000..cd5e69b
--- /dev/null
@@ -0,0 +1,15 @@
+username xxx
+password yyy
+protocol tic
+server tic.sixxs.net
+tunnel_id Txy
+
+ipv6_interface sixxs
+verbose false
+daemonize true 
+automatic true
+pidfile /var/run/aiccu.pid
+
+# Script to run after setting up the interfaces (default: none)
+#setupscript /usr/local/etc/aiccu-subnets.sh
+
diff --git a/config/ip6.startup b/config/ip6.startup
new file mode 100755 (executable)
index 0000000..a3e805d
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+ip -6 addr add 2001:DB8::/64 dev br0
+ip -6 route add 2001:DB8::/64 dev br0
+
+# route the rest of the /48 to loopback
+ip -6 route add 2001:DB8::/48 dev lo
+
+/jffs/etc/filters6.sh
+/usr/sbin/radvd -C /jffs/etc/radvd.conf
+
diff --git a/config/rootprofile.startup b/config/rootprofile.startup
new file mode 100755 (executable)
index 0000000..bd45b12
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+# some useful extensions for the root users .profile
+
+echo "alias pkgl='grep Package /jffs/usr/lib/ipkg/status|sort'" >> /tmp/root/.profile
+echo "alias wget='/jffs/usr/bin/wget'" >> /tmp/root/.profile
+echo "alias ifstat='ifstat -i br0,ppp0,sixxs'" >> /tmp/root/.profile
+
diff --git a/config/sixxs.ipup b/config/sixxs.ipup
new file mode 100755 (executable)
index 0000000..632ac0e
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+# wait until time is synced
+while [ `date +%Y` -eq 1970 ]; do
+       sleep 5 
+done
+
+# check if aiccu is already running
+if [ -n "`ps|grep etc/aiccu|grep -v grep`" ]; then
+       /jffs/etc/init.d/aiccu stop
+       killall aiccu
+fi
+
+# start aiccu
+sleep 5
+/jffs/etc/init.d/aiccu start
+
diff --git a/filters6.sh b/filters6.sh
new file mode 100755 (executable)
index 0000000..0076c3b
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/sh
+#very ugly and short hack to block some incoming IPv6 traffic
+
+export PATH=$PATH:/jffs/usr/sbin
+export IP6TABLES_LIB_DIR=/jffs/usr/lib/iptables
+
+# set bash profile of user root 
+echo "export IP6TABLES_LIB_DIR=/jffs/usr/lib/iptables" >> /tmp/root/.profile
+
+# load required kernel modules
+MODPATH='/jffs/lib/modules/2.6.24.111'
+KMODS='ip6_tables.ko ip6table_filter.ko nf_conntrack_ipv6.ko'
+for x in $KMODS; do
+  insmod $MODPATH/$x
+done
+
+# flush tables
+ip6tables -F INPUT
+ip6tables -F OUTPUT
+ip6tables -F FORWARD
+
+# set default policy
+ip6tables -P INPUT ACCEPT
+ip6tables -P OUTPUT ACCEPT
+ip6tables -P FORWARD DROP
+
+
+
diff --git a/init.d/aiccu b/init.d/aiccu
new file mode 100755 (executable)
index 0000000..a6d8f26
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+export PATH=$PATH:/jffs/usr/sbin
+
+case "$1" in
+       start)
+       aiccu start /jffs/etc/aiccu.conf
+       ;;
+       stop)
+       aiccu stop /jffs/etc/aiccu.conf
+       ;;
+       restart)
+       $0 stop
+       sleep 10
+       $0 start
+       ;;
+       *)
+       echo "Usage: $0 {start|stop|restart}"
+       exit 1
+       ;;
+esac
+
diff --git a/radvd.conf b/radvd.conf
new file mode 100644 (file)
index 0000000..9ab6a32
--- /dev/null
@@ -0,0 +1,8 @@
+interface br0
+{
+  AdvSendAdvert on;
+  prefix 2001:DB8::/64
+  {
+  };
+};
+