aboutsummaryrefslogtreecommitdiffstats
path: root/config/includes.chroot/etc/network/interfaces
diff options
context:
space:
mode:
authorficus <ficus@robocracy.org>2012-11-17 01:19:44 +0100
committerficus <ficus@robocracy.org>2012-11-17 01:19:44 +0100
commit4b7afd6137b62dfcfc09aa8a05f59935fef69489 (patch)
treee4466fd24d48ff303caaaeb3a190ee0a223f0df0 /config/includes.chroot/etc/network/interfaces
parentd2e16f2311fbf6d2a93dfde5adc86dc8e27381aa (diff)
downloadtorouter-live-4b7afd6137b62dfcfc09aa8a05f59935fef69489.tar.gz
torouter-live-4b7afd6137b62dfcfc09aa8a05f59935fef69489.zip
import conf from old torouter repository
Diffstat (limited to 'config/includes.chroot/etc/network/interfaces')
-rw-r--r--config/includes.chroot/etc/network/interfaces44
1 files changed, 44 insertions, 0 deletions
diff --git a/config/includes.chroot/etc/network/interfaces b/config/includes.chroot/etc/network/interfaces
new file mode 100644
index 0000000..34b2f35
--- /dev/null
+++ b/config/includes.chroot/etc/network/interfaces
@@ -0,0 +1,44 @@
+# This file describes the network interfaces available on your system
+# and how to activate them. For more information, see interfaces(5).
+
+# The loopback network interface
+auto lo
+iface lo inet loopback
+
+# The primary network interface
+auto eth0
+iface eth0 inet dhcp
+ post-down ifdown uap0
+
+auto eth1
+iface eth1 inet static
+ address 10.23.42.1
+ netmask 255.255.255.0
+ network 10.23.42.0
+ broadcast 10.23.42.255
+ pre-up ip addr del 10.23.42.1/24 dev eth1 || true
+ post-up echo 1 > /proc/sys/net/ipv4/ip_forward
+ post-up /etc/init.d/dnsmasq_lan start
+ # this must happen after have brought up uap0 because it clears the nat tables
+ post-up iptables -t nat -A POSTROUTING -s 10.23.42.0/24 -o eth0 -j MASQUERADE
+ pre-down /etc/init.d/dnsmasq_lan stop
+
+# The magic Tor wireless network
+auto uap0
+iface uap0 inet static
+ address 172.16.23.1
+ netmask 255.255.255.0
+ network 172.16.23.0
+ broadcast 172.16.23.255
+ pre-up ifconfig uap0 hw ether 00:66:66:66:66:66
+ pre-up ip addr del 172.16.23.1/24 dev uap0 || true
+ post-up /etc/init.d/tor start
+ post-up /etc/init.d/tor reload
+ post-up /etc/init.d/dnsmasq_wifi start
+ post-up /etc/init.d/ttdnsd restart
+ post-up /usr/bin/uaputl sys_cfg_ssid "torproject" || true
+ post-up /usr/bin/uaputl bss_start || true
+ post-up /usr/sbin/tor-wireless-firewall.sh || true
+ post-up /sbin/iptables -t nat -A OUTPUT -p tcp -d 10.192.0.0/10 -j REDIRECT --to-ports 9040
+ pre-down /usr/bin/uaputl bss_stop || true
+ pre-down /etc/init.d/dnsmasq_wifi stop