Onion Pi tears

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
SomeOtherMattT
 
Posts: 3
Joined: Fri May 23, 2014 6:48 am

Onion Pi tears

Post by SomeOtherMattT »

Helping my brother set up his Onion Pi. He got the whole kit and kaboodle from Adafruit, including the wireless antenna.

Following the tutorial was a palaver, so ended up using the script at http://raspberry-at-home.com/hotspot-wifi-access-point/. Told it to use eth0 to connect to the net, to use an SSID of 'Pi', and to use a 192.168.42.X subnet (rather than my usual 192.168.0.X). Rebooted, ssid 'Pi' appeared, connected, my IP now 192.168.4.2, Internet, lovely.

Ran the script at adafruit for installing Tor etc. Again, all seemed to go fine. Rebooted, SSID 'Pi' appeared, connected - no Internet.

Checked my client IP: 192.168.42.2, as expected. SSHd to the Pi (192.168.42.1). Pinged google from the Pi, all good. So the Pi can see the net; the Pi is broadcasting an SSID; the laptop can see the Pi; the Pi seems to let the laptop connect wirelessly; but the Pi won't let the laptop see the net.

Tried plugging 192.168.42.1:9050 (and then 9040) into Firefox settings as a SOCKSv5 host, and then as each / all of the various proxies. Firefox whinged that I was trying to connect to a proxy that was refusing connections.

Poked around here for a bit, took out a reference to hot plugging wlan0 from /etc/network/interfaces (just left it at auto), rebooted. Now the laptop can see the Pi SSID, but won't connect: I end up with a 169.254.184.X IP and Windows 8 whinging that my wireless is hooked up to an 'unidentified network - no Internet'. I think I'll leave it alone now until I can talk to somebody who knows what they're doing.

If I connect back to my main wireless network I can still SSH in through the 192.168.0.x subnet.

If it helps, here's /etc/network/interfaces (seeing as though that's the last thing I was buggering about with when it really broke):

Code: Select all

auto lo

iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
iface wlan0 inet static
  address 192.168.42.1
  netmask 255.255.255.0
up iptables-restore < /etc/iptables.ipv4.nat
sudo iptables -S:

Code: Select all

-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
sudo iptables -t nat -S:

Code: Select all

-P PREROUTING ACCEPT
-P INPUT ACCEPT
-P OUTPUT ACCEPT
-P POSTROUTING ACCEPT
(That's odd, isn't it? Shouldn't it say something about REDIRECTing?)
sysctl net.ipv4/ip_forward:

Code: Select all

net.ipv4.ip_forward = 1
cat /proc/sys/net/ipv4/ip_forward

Code: Select all

1
Cheers
Matt

SomeOtherMattT
 
Posts: 3
Joined: Fri May 23, 2014 6:48 am

Re: Onion Pi tears

Post by SomeOtherMattT »

Re-ran the AP configuration script from raspberry-at-home, rekeyed the TOR stuff from the tutorial on this site. Iptables now shows traffic set up to redirect to relevant ports, and I can connect to the AP and get the correct 192.168.42.X subnet. Pi can ping out to the net, laptop can ping the Pi, as well as 8.8.8.8 and 8.8.4.4. However, still no net on the laptop through the Pi.

I've downloaded torbutton for Firefox, but various combinations of proxy setup don't seem to make a difference. Given the setup seems to be behaving like it should (Pi can see net, Tor running, AP working, iptables / NAT seem to be OK), I'm guessing the last bit - browser configuration - is the bit I'm stuffing up. Any tips? Happy to present output from any command you think might be relevant.

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: Onion Pi tears

Post by adafruit_support_mike »

If the laptop can ping 8.8.8.8 and 8.8.4.4, but can't see general internet traffic, you might have a DNS problem.

Are you sure you carved out an exception for port 53 traffic when you set up your NAT rules?

https://learn.adafruit.com/onion-pi/install-tor

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”