I have followed this tutorial on making an 'onion pi'. This is a Wifi Access Point, which routes traffic through tor. This has worked completely and well, although the only problem I have come into is hosting a local server on the raspberry pi running the AP. Trying to use apache2
to host the server, I am not able to access the host on any machines connected to my AP. Firefox gives me "Unable to connect" errors. My raspberry pi has two ip's (one from the AP, one for the router it connects to), but trying both I get nothing, is there some kind of iptable
setup I need, or otherwise to allow connections to it.
netstat -tlnp
shows:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN -
tcp 0 0 192.168.42.1:9040 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:9050 0.0.0.0:* LISTEN -
*Ommiting unrelated ports.
This shows apache2 is running fine, I think it must be something I must do for the connection.
service apache2 status
do ? – Havnar Sep 3 '14 at 16:53service apache2 status
giveApache2 is running (pid 2569).
Apache2 is running fine, with a pid, but I don't know why netstat hasn't shown it. – ptolemy0 Sep 3 '14 at 17:02service apache2 reload
service apache2 restart
– Havnar Sep 3 '14 at 17:18default
not000-default
(I assume this doesn't matter), the port is 80. – ptolemy0 Sep 3 '14 at 17:32iptables
for port 22 (ssh). As followssudo iptables -t nat -A PREROUTING -i wlan0 -p tcp --dport 22 -j REDIRECT --to-ports 22
. What would I change for http (port 80), would it just be the 22's to 80's? – ptolemy0 Sep 3 '14 at 17:41