So I followed the exact instructions for the OnionPi and it works great! My problem is that I'm trying to throw a web server on there and allow it to be accessed through the AP (192.168.42.1). However, the web server works (PHP+Apache+MySQL) when I view it from the LAN side at 192.168.2.102 [IP of the OnionPi from my router]. Everything is followed to a T with the instruction on this website for OnionPi and it's just a default install of PHP, Apache, and MySQL.
It doesn't work when I connect to the AP (192.168.42.1) and go to http://192.168.42.1 .
Trying to clarify so it's not too confusing, here is my setup:
Internet(192.168.1.1[running off neighbours]) -> Router (192.168.2.1) -> (192.168.2.102)-OnionPi-(192.168.42.1)-> (192.168.42.11)Computer
So, when the computer is connected to the router (192.168.2.1) and I look at http://192.168.2.102 I can see the web page
When I connect to the OnionPi (192.168.42.1) and look at http://192.168.42.1 I don't see the web page.
I was told to use bind9 but I can't seem to get that to work either. Here is what I did with the bind9 server
named.conf.local:
Code: Select all
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
zone "onion.pi" {
type master;
file "/etc/bind/db.onion.pi";
allow-update { key rndc-key; };
};
zone "42.168.192.in-addr.arpa" {
type master;
notify no;
file "/etc/bind/db.192";
allow-update { key rndc-key; };
};
Code: Select all
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA www.onion.pi. root.localhost. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS www.onion.pi
www IN A 192.168.42.1
Code: Select all
;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA www.onion.pi. root.localhost. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS www.
1 IN PTR www.onion.pi.
When I run a dig command to onion.pi this is what I get
Code: Select all
dig onion.pi
; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> onion.pi
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 39819
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available
;; QUESTION SECTION:
;onion.pi. IN A
;; Query time: 178 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Wed Apr 22 00:57:08 2015
;; MSG SIZE rcvd: 26