以前のリビジョンの文書です
Onionルータ
torrc(1)
# vi /etc/tor/torrc
Log notice file /var/log/tor/notices.log VirtualAddrNetwork 10.192.0.0/10 AutomapHostsSuffixes .onion,.exit AutomapHostsOnResolve 1 TransPort 9040 TransListenAddress 127.0.0.1 TransListenAddress 192.168.20.1 TransListenAddress 192.168.21.1 DNSPort 53 DNSListenAddress 127.0.0.1 DNSListenAddress 192.168.20.1 DNSListenAddress 192.168.21.1
# sudo service tor start
#vi /etc/hostapd/hostapd.conf
myap/XXXXXX user / yamada
torrc(2)
(http://learn.adafruit.com/onion-pi/install-tor)
$ vi /etc/tor/torrc
Log notice file /var/log/tor/notices.log VirtualAddrNetwork 10.192.0.0/10 AutomapHostsSuffixes .onion,.exit AutomapHostsOnResolve 1 TransPort 9040 TransListenAddress 192.168.42.1 DNSPort 53 DNSListenAddress 192.168.42.1
iptables設定
$ sudo iptables -t nat -A PREROUTING -i wlan0 -p tcp --dport 22 -j REDIRECT --to-ports 22 $ sudo iptables -t nat -A PREROUTING -i wlan0 -p udp --dport 53 -j REDIRECT --to-ports 53 $ sudo iptables -t nat -A PREROUTING -i wlan0 -p tcp --syn -j REDIRECT --to-ports 9040 $ sudo iptables -t nat -L $ sudo sh -c "iptables-save > /etc/iptables.ipv4.nat"
$ vi /etc/network/interfaces (これは動かない)
up iptables-restore < /etc/iptables.ipv4.nat
$vi /etc/network/if-pre-up.d/iptables (こちらはOK)
#!/bin/sh
/sbin/iptables-restore < /etc/iptables.ipv4.nat
ログ生成
$ sudo touch /var/log/tor/notices.log
$ sudo chown debian-tor /var/log/tor/notices.log
$ sudo chmod 644 /var/log/tor/notices.log
サービス開始
$ sudo service tor start
$ sudo service tor status
$ sudo update-rc.d tor enable
swap設定
$ apt-get install chkconfig
$ chkconfig dphys-swapfile off
$ chkconfig dphys-swapfile –list