filetme Posted June 7, 2023 Posted June 7, 2023 Hi all, I have been working away for a few days trying to get Evil Portal Module working. I have downloaded all the sample portals from GitHub and I have tried them internal and on the SD card. I have ensured that PineAP is on. The server is started. The site is activated. I have ensured that the .ep files exist and I have not touched or changed anything from the downloaded portals. The preview is ALWAYS empty. A few questions that might help me in diagnosing the problem: 1. Where are the logs ... I saw threads where they said /tmp/logs ... some that mentioned /root/portals/ but there is nothing there. 2. What is the web server? Is there anyway for me to SSH to the pineapple and ensure that the webserver is working? 3. Is there any reason why the preview might not be loading? 4. Obviously the Captive Portal is NOT working but I think that is a moot point until I can at least get a Preview working. Does anyone have any helpful information to help me diagnose why this module appears to be doing nothing at all? Maybe my Nano is too old? It is loaded with the most recent version 2.7.0 Any help is greatly appreciated.
dark_pyrro Posted June 7, 2023 Posted June 7, 2023 What portals did you use? Kleo portals? Logs are stored here if using the Micro SD card as storage location: /sd/portals/<portal name>/.logs for example: /sd/portals/google-login/.logs nginx is serving the pages on port 80 with the root in /www symbolic links to the activated portal shall be found there (but only when a portal is set to Active) config file for the nginx web server is located here: /etc/nginx/nginx.conf The Nano is not too old to use the portals, at least not the Kleo ones. It works as expected on my Nano.
filetme Posted June 7, 2023 Author Posted June 7, 2023 14 minutes ago, dark_pyrro said: What portals did you use? Kleo portals? Logs are stored here if using the Micro SD card as storage location: /sd/portals/<portal name>/.logs for example: /sd/portals/google-login/.logs nginx is serving the pages on port 80 with the root in /www symbolic links to the activated portal shall be found there (but only when a portal is set to Active) config file for the nginx web server is located here: /etc/nginx/nginx.conf The Nano is not too old to use the portals, at least not the Kleo ones. It works as expected on my Nano. Yes Kleo ... Thank you for the information. Since I am limited to replies on the forum ... I will take the information you gave me and bang my head up against the wall a little more ... and post my progress tomorrow. Thank you very much for the information. It should help in my efforts to figure out why this is not working. I do appreciate it.
filetme Posted June 7, 2023 Author Posted June 7, 2023 What if no .logs folder exists? /sd/portals ls -Ra | grep logs results in an empty listing tried in /root/portals with the same result.
dark_pyrro Posted June 7, 2023 Posted June 7, 2023 To get a .logs file, you need to have an evil portal working with saved loot, but since you don't seem to be able to get it working, it's difficult to find any such file(s)
filetme Posted June 8, 2023 Author Posted June 8, 2023 If the NGINX server was not able to serve up portals, would that log show up anywhere?
filetme Posted June 8, 2023 Author Posted June 8, 2023 FYI ... loaded up the console in Google Chrome instead of Safari. I can see in the preview pane: 172.16.42.1 took too long to respond. This is interesting since the IP I am now accessing the Pineapple with is: 192.168.2.10 as per setup instructions. Is there some change I need to make in the web server config?
dark_pyrro Posted June 8, 2023 Posted June 8, 2023 5 hours ago, filetme said: 192.168.2.10 as per setup instructions What instructions tells you to use that IP range? The open AP should serve the clients with IP addresses from the 172.16.42.0/24 range (just like for any other interface on the Nano that uses dnsmasq to serve IP addresses to clients).
filetme Posted June 8, 2023 Author Posted June 8, 2023 4 hours ago, dark_pyrro said: What instructions tells you to use that IP range? The open AP should serve the clients with IP addresses from the 172.16.42.0/24 range (just like for any other interface on the Nano that uses dnsmasq to serve IP addresses to clients). http://j2abro.blogspot.com/2016/07/configuring-wifi-pineapple-nano-on-mac.html Set Nano IP Address Thanks to audibleblink for this post which describes configuring the Nano's network interface to work your Mac's internet sharing. Here are the steps: Reconnect to the Pineapple access point, i.e MyPineappleWifi SSH to your Nano from your Mac terminal: ssh root@172.16.42.1 If you have installed other Pineapples and you get an SSH error, you may need to first clear the keys from your known_hosts file: ssh-keygen -R 172.16.42.1 From the shell of your Nano, configure the device's IP address and gateway. This will once again disconnect you from the Nano. uci set network.lan.ipaddr='192.168.2.10' uci set network.lan.gateway='192.168.2.1' uci commit && reboot Continue Configuration Hard reboot: I had to unplug the Nano from USB, then reconnect to be able to connect to it after the network configuration. You shouldn't need to connect to the Nano's access point (i.e. MyPineappleWifi) at this point. You should make sure that your Mac is connected to a network and has Internet access though. Once your Nano reboots, try to reconnect via a web browser: http://192.168.2.10:1471/ (using the IP address you set in step 3, above) From the main Dashboard click "Load Bulletins..." button. If the data loads your Nano has an internet connection.
dark_pyrro Posted June 8, 2023 Posted June 8, 2023 OK, that's unofficial. I wouldn't change the Nano "base" IP address like that. I have no Mac though so I can't suggest any alternative way of setting it up. By default, the Nano expects internet connectivity on the 172.16.42.42 address and that's what the interface (that the Nano is enumerated as on the host computer) should have as set address. The (by far) easiest way to enable network access on the Nano is to attach a USB WiFi adapter to the Type A female USB port and set it up in the web UI.
dark_pyrro Posted June 8, 2023 Posted June 8, 2023 The reason why I don't recommend altering the "out of the box" IP address range for the Nano is most likely also related to your Evil Portal issues (or will be if you continue to use an alternative IP range). If you look through the code of the Evil Portal module, you can, without any real deep digging, notice that the 172.16.42.0/24 range is hard coded into the module. So... if you want to use an alternative IP range for the Nano, expect to need to change module code if you want things to work as expected (at least 6 of the modules available for the Nano has the 172.16.42.x range hard coded in some way).
filetme Posted June 8, 2023 Author Posted June 8, 2023 So I see the same type of instructions from the following site ... How To Set Up A WiFi Pineapple Nano | Ryandinho But maybe these are for older versions. Maybe the setup has changed over time. I have a WIFI dongle so I will, perform a reset and try that rather than the internet sharing from the Mac and how I make out.
filetme Posted June 9, 2023 Author Posted June 9, 2023 12 hours ago, dark_pyrro said: The reason why I don't recommend altering the "out of the box" IP address range for the Nano is most likely also related to your Evil Portal issues (or will be if you continue to use an alternative IP range). If you look through the code of the Evil Portal module, you can, without any real deep digging, notice that the 172.16.42.0/24 range is hard coded into the module. So... if you want to use an alternative IP range for the Nano, expect to need to change module code if you want things to work as expected (at least 6 of the modules available for the Nano has the 172.16.42.x range hard coded in some way). So I have validated that the Evil Portal is working as long as I am working from a Windows device and not changing the IP. Not really an obvious issue and I have no noticed any documentation anywhere advising or warning folks that might want to use a Mac OSX. Thanks for helping me find this issue. I will certainly keep folks up to date if I decide to try and change the IPs in the code.
filetme Posted June 10, 2023 Author Posted June 10, 2023 Also validated that this all works as long as I was not trying to work through the UCI and changing the address space. Not sure where that came from but those install instructions must have been something you needed to do in the past but not anymore.
filetme Posted June 10, 2023 Author Posted June 10, 2023 One last note for people who might run into a similar problem in the future. I was using the Y cable from the Macbook Pro and I don't think the WIFI dongle was getting enough power. One I switched to USB tether with a phone there were no more issues. As dark_pyrro suggested above I highly recommend using the phone with USB tether over the Wifi dongle. Cheers all!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.