|
Post by xtr4nge on Aug 8, 2015 9:03:41 GMT
--
|
|
|
Post by reb00t on Aug 15, 2015 22:04:54 GMT
Hi xtr4nge I'm struggling a bit to figure out the captive portal - Its working and parsing the index.php but The code in the index.php seems to confuse me as I cant make the page run correctly and produce what its meant to. I'm pretty certain that i'm meant to uncomment some things but truly I struggle with web code so wondering if you can post a working page by any chance? Thanks, Reb00t
|
|
|
Post by xtr4nge on Aug 16, 2015 8:43:31 GMT
Hi reb00t, Could you explain to me more what is the problem? I can't understand what is the issue that you are having. Are you using Captive Portal v1.5? Are you talking about the module's page? or are you talking about the user's captive portal page? ( the page that the users see with the message about the captive portal ) You don't' need to uncomment any code. What are you trying to achieve? If you can, please show me some screenshots regards,
|
|
|
Post by reb00t on Aug 16, 2015 18:25:14 GMT
Hi xtr4nge Thanks for replying. Everything is working with the admin panel. and I can see everything is working with regards to forcing the connected hosts to my web server root What the problem seems to be is the files inside the web root that are not displaying the login prompt to my connected users. All i get is a page with a dot "." When I view the source of that page I get this So I then check /captive/index.php and this is the file I'm sure my victims are meant to be seeing, but for the life of me I cant get that page to run correctly. Like I said in my last post i'm not very clued up on php and html coding and I'm sure that's where I'm failing. Thanks man..
|
|
|
Post by xtr4nge on Aug 17, 2015 13:34:55 GMT
Hi reb00t,
At the top of the file index.php you need to have the include that you mentioned (only 1 is enough), but you don't need to add the line, the module is adding the line for you.
You also need to have the following link created:
captive -> /usr/share/fruitywifi/www/modules/captive/www.captive
Note: The link is created automatically when you start the module, so if it is not there, then there is a problem.
Also check that you have conntrack installed.
You can do a quick test. Just hit the default page on the webserver (example: http://10.0.0.1/ if you are using the default ip) and you are going to be redirected to the captive portal page. That is the only thing that the include is doing in the index.php page.
If you only see a "." (dot), then there is a problem with PHP. (short_open_tag needs to be enabled)
Let me know regards,
|
|
|
Post by reb00t on Aug 17, 2015 15:57:36 GMT
Hi again xtr4nge, I see you had some problems posting earlier too. The proboards does not like "var / www /" together if you try make a post with that it freaks out Back to my issue. Still the same thing. Contrack is installed short_open_tag is enabled in both /etc/php5/cli/php.ini +/etc/php5/fpm/php.ini captive -> /usr/share/fruitywifi/www/modules/captive/www.captive exists index.php <? header("Location: captive/index.php"); exit; /* FruityWifi-Captive */ ?> . but still the same thing When I access the page on http://10.0.0.1/ The access-www.log shows me this 10.0.0.67 - - [17/Aug/2015:15:54:37 +0000] "*3" 400 172 "-" "-" 10.0.0.67 - - [17/Aug/2015:15:54:40 +0000] "*3" 400 172 "-" "-" 10.0.0.67 - - [17/Aug/2015:15:54:44 +0000] "GET / HTTP/1.1" 200 105 "-" "Mozilla/5.0 (Linux; Android 5.1; Nexus 5 Build/LMY47I) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.133 Mobile Safari/537.36" 10.0.0.67 - - [17/Aug/2015:15:54:44 +0000] "GET /favicon.ico HTTP/1.1" 200 32038 "http://10.0.0.1/" "Mozilla/5.0 (Linux; Android 5.1; Nexus 5 Build/LMY47I) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.133 Mobile Safari/537.36" 10.0.0.67 - - [17/Aug/2015:15:54:47 +0000] "GET /generate_204 HTTP/1.1" 200 0 "-" "Dalvik/2.1.0 (Linux; U; Android 5.1; Nexus 5 Build/LMY47I)" 10.0.0.67 - - [17/Aug/2015:15:54:57 +0000] "*3" 400 172 "-" "-"
Nothing in the error-www.log Hope this helps you to help me a bit more. Would be awesome to get this working
|
|
|
Post by xtr4nge on Aug 18, 2015 9:24:00 GMT
Hi reb00t, FruityWiFi and Nginx modules are using different config files. Please check the new PHP5-FPM config files introduced on v2.2: github.com/xtr4nge/FruityWifi/tree/master/nginx-setup/fpmThere are 4 different config files: - FruityWiFi uses: 8000.conf and 8443.conf - Nginx module uses: 80.conf, 443.conf some of the new lines on each config file are: php_value[short_open_tag] = On php_value[error_reporting] = E_ALL ^ E_NOTICE php_admin_flag[opcache.enable] = off Check that you have those lines in the config files: /etc/php5/fpm/pool.d/Let me know regards,
|
|
|
Post by reb00t on Aug 18, 2015 14:03:24 GMT
Hiya xtr4nge, YES!! we have liftoff Those lines needed to be added to the confs in /etc/php5/fpm/pool.d/ Thanks so much for your help man.. Hopefully I wont be back to make a nuisance of myself
|
|
|
Post by xtr4nge on Aug 18, 2015 15:33:16 GMT
Hi reb00t, Cool, No prob at all regards,
|
|
|
Post by reb00t on Aug 19, 2015 13:34:46 GMT
Once again, thanks xtr4nge
I think I have found what I had done wrong! I had originally installed from apt-get then installed over that from git source. It seems the apt release is a fair bit different from the git version and the configs from apt release caused some issues,,
|
|
|
Post by reb00t on Sept 11, 2015 20:15:01 GMT
Hi there xtr4nge, Hope you are ok mate? I have a question. Not really an issue. I've been running the captive now for some time and it seems okay if people are using a web browser to access the internet as they get the captive portal login page prompt Most things now have their own stand alone apps like twitter, facebook so unless they are accessing those sites via a browser then they wont see that captive portal page/ What I notice in some places that has free wifi is you walk in, your phone see's the signal, it connects and then you get a prompt on your phone / device that says "you need to sign into this network" Once you click that, your browser automatically goes to the web browser "captive portal" The reason why. I see many many connections to my Fake AP but from the logs, most of the data is api's from those specific apps How can we force them to sign in
|
|
varta
New Member
Posts: 1
|
Post by varta on Oct 7, 2015 12:03:55 GMT
Hi all, I have a question (or rather two ) about configuring the Captive portal. First, when messing with the IP tables, the portal doesn't redirect the user to the "home URL" of the server (like let's say 10.0.0.1), but instead it masks itself as the host that the client wanted to access (e.g. the when the original request is for google.com, the redirection leads to google.com/captive/index.php). This is not really a good behaviour, mainly on secure sites using https, because many browsers won't even let You display the page as you are trying to pretend you are the original secure server (e.g. https://www.google.com) which you are not. Please how can I achieve the aforementioned behaviour that would actually redirect user to the "home" IP of my server instead of just getting the data from this server while trying to act as the originally requested host? Second, when accepting the AUP (e.g. hitting the button that triggers process.php) the device is successfully logged in and the internet access is available, but the problem is in the redirection back to the originally requested page. (i.e. the line that injects header to browser). I have tried: header('Location: ' . $_SERVER["HTTP_ORIGIN"]); header('Location: ' . $_SERVER['HTTP_REFERER']); header('Location: http://$io_in_ip/captive/welcome.php?site='.$_SERVER["HTTP_ORIGIN"]); but I always get a request timeout error. However, when I manually type the URL again, it connect without problem (so the problem is in the redirection). Please can You give me some hint on how to configure this? Thanks very much.
|
|