aboutsummaryrefslogtreecommitdiffstats
path: root/config/includes.chroot/etc
diff options
context:
space:
mode:
authorficus <ficus@robocracy.org>2012-11-22 17:28:29 +0100
committerficus <ficus@robocracy.org>2012-11-22 17:28:29 +0100
commit1b789097162793b3f57f5abbc0af313fce1dc2cf (patch)
tree7bb5a091b87e7d7277e2a12973a74c6bda01e872 /config/includes.chroot/etc
parent294467e6b345b4259590491579edd3a96d461d29 (diff)
downloadtorouter-live-1b789097162793b3f57f5abbc0af313fce1dc2cf.tar.gz
torouter-live-1b789097162793b3f57f5abbc0af313fce1dc2cf.zip
update interfaces
Diffstat (limited to 'config/includes.chroot/etc')
-rw-r--r--config/includes.chroot/etc/network/interfaces19
1 files changed, 11 insertions, 8 deletions
diff --git a/config/includes.chroot/etc/network/interfaces b/config/includes.chroot/etc/network/interfaces
index 34b2f35..07ad7f5 100644
--- a/config/includes.chroot/etc/network/interfaces
+++ b/config/includes.chroot/etc/network/interfaces
@@ -5,21 +5,24 @@
auto lo
iface lo inet loopback
-# The primary network interface
-auto eth0
+# The primary (upstream) network interface
+allow-hotplug eth0
iface eth0 inet dhcp
+ post-up ifup uap0
post-down ifdown uap0
-auto eth1
+# The LAN network interface (not tor-ified)
+allow-hotplug 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
+ 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
+ # 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
@@ -31,14 +34,14 @@ iface uap0 inet static
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
+ 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/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
+ 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