diff --git a/install b/install new file mode 100644 index 0000000..8ccea50 --- /dev/null +++ b/install @@ -0,0 +1,82 @@ +#!/bin/bash + +# Created By Armin Kazemi +# github.com/arminkz/TORPi + +RED='\033[0;31m' +YEL='\033[1;33m' +BRW='\033[0;33m' +NC='\033[0m' + +echo -e "\033[1;37;44m TORPi - Version 0.1 \033[0m" +echo -e " + _ _ _ \033[0;31m _ _ \033[0m + /\ \ /\ \ /\ \ \033[0;31m /\ \ /\ \ \033[0m + \_\ \ / \ \ / \ \ \033[0;31m / \ \ \ \ \ \033[0m + /\__ \ / /\ \ \ / /\ \ \ \033[0;31m / /\ \ \ /\ \_\ \033[0m + / /_ \ \ / / /\ \ \ / / /\ \_\ \033[0;31m / / /\ \_\ / /\/_/ \033[0m + / / /\ \ \ / / / \ \_\ / / /_/ / / \033[0;31m / / /_/ / // / / \033[0m + / / / \/_// / / / / // / /__\/ / \033[0;31m / / /__\/ // / / \033[0m + / / / / / / / / // / /_____/ \033[0;31m / / /_____// / / \033[0m + / / / / / /___/ / // / /\ \ \ \033[0;31m / / / ___/ / /__ \033[0m +/_/ / / / /____\/ // / / \ \ \ \033[0;31m/ / / /\__\/_/___\ \033[0m +\_\/ \/_________/ \/_/ \_\/\033[0;31m \/_/ \/_________/ \033[0m + " + + +echo -e "Installing Required Packages ..." +apt install -y -qq hostapd dnsmasq +systemctl stop hostapd +systemctl stop dnsmasq + + +#must set static ip for wlan0 in dhcpcd.conf + + +systemctl restart dhcpcd + + +#must configure /etc/hostapd/hostapd.conf +#SSID / PASS / ... + +# must set /etc/hostapd/hostapd.conf + +#backup +sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.old + +#must set /etc/dnsmasq.conf + +#set /etc/sysctl.conf -> net.ipv4.ip_forward=1 +sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward" + +iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE +sh -c "iptables-save > /etc/iptables.ipv4.nat" + +#must add /etc/rc.local + +service hostapd start +service dnsmasq start + +apt install -y -qq tor +#set /etc/tor/torrc + +iptables -F +iptables -t nat -F + +iptables -t nat -A PREROUTING -i wlan0 -p tcp --dport 22 -j REDIRECT --to-ports 22 +iptables -t nat -A PREROUTING -i wlan0 -p udp --dport 53 -j REDIRECT --to-ports 53 +iptables -t nat -A PREROUTING -i wlan0 -p tcp --syn -j REDIRECT --to-ports 9040 + +sh -c "iptables-save > /etc/iptables.ipv4.nat" + +touch /var/log/tor/notices.log +chown debian-tor /var/log/tor/notices.log +chmod 644 /var/log/tor/notices.log + +service tor start +service tor status + +update-rc.d tor enable + +reboot +