Topic: Redirection after succesful login

Hi All,

First of all It was yesterday the first time when I have read about Chillispot so my knowledge about it has missing bits.

So far I could manage to build a Chillispot box using Debian Etch + Apache 2.2+SSL+Freeradius+BIND9 and Chillispot from Debian repository.
Everything seems working fine except one thing:
- if a user want to open a page other than tha default in the browser (by clicking to a URL) Chilli redirects the request to the login window as it is meant to do. However, after a successful login the browser gets redirected to the browser's default page instead of the one requested first.

I do not know whether it "by design" behaviour or it is a flaw and can be fixed.

Thank you for your help in advance.

Cheers,

Re: Redirection after succesful login

It's quite easy to tune.

Edit /usr/lib/cgi-bin/hotspotlogin.cgi (or whatever you're using, for me it would be /var/www/hotspotlogin.php), look for

opener.location = \"about:home\";

and change about:home to whatever you want the post-auth location to be.  Don't forget to '\' any special characters (",/ etc).

Hope that helps

Jon
:^)

3 (edited by jonallport 2008-11-13 15:40:51)

Re: Redirection after succesful login

Having just looked at your question again, and re-read hotspotlogin.??? examples I have to hand:

Try changing:

opener.location = \"about:home\";

to

opener.location = $userurl;

$userurl is a variable pulled from the original, intercepted page request.  and (hopefully) contains the URL that was intercepted to redirect to the landing page.  I'll try this myself and post feedback!

:^)

4 (edited by jonallport 2008-11-13 15:51:23)

Re: Redirection after succesful login

Nope, that didn't work; $userurl is empty for me!

Will have another look.

Re: Redirection after succesful login

Hi,

Thank you for your effort, I really appreciate it.

I am looking forward from hearing from you soon.

Cheers,

Re: Redirection after succesful login

Hi yvor77,
Can you do me favour one thing , can you help to get your configuration .

As i have configured all thing ==>Red Hat Enterprise Linux AS release 4 + apache 2.0 + SSL + BIND9 + iptables
I am not getting any error even. My client is able to get ip address even.
I have following problem.
1) if user wants to open page chilli does not redirect to login page window.

User can not able to sirf if apply full iptables but user can be able to surf if apply only NAT rule is iptables. but it never redirects to login page.
can you help me to get your configuration please ?

Harindra.

Re: Redirection after succesful login

Hi harindra,

I am away from my chillispot right now. However, I would suggest the following:

1, Check if chillispot is running (/usr/sbin/chilli for me on debian Etch) because I have
found that when chilli was running it blocked traffic towards internet. So when even you
have problem with chillispot configuration (no redirection to login page) but if chillispot is
running, you should not be able to browse the internet.

2, If you cannot browse internet when you use iptables with rules other than NAT rules, it
probably blocks DNS traffic from/to the chillispot box. You should not block DNS traffic
(udp 53 on the INPUT chain coming from the internal LAN). You should also make sure your
chillispot box has access to DNS server.

3, Can you access the chillispot's login page manually entering its URL in your browser?

cheers,

Yvor77

Re: Redirection after succesful login

Hi guys,

I had same problem. After analyze the http log from my client, I found that on the POST process do send the userurl to chilli but chilli doesn't return it back to the url.

However I remember that after I had a fresh flash of dd-wrt v24 sp1 the chilli works well even the first requested URL.. now it has something wrong..

Please give me advice.....


Thanks..

Re: Redirection after succesful login

I got an answer....Fix the url parameter in the refresh url, just add userurl=your url.

Original portal codes:
=======================
if (isset($uamsecret) && isset($userpassword)) {
    echo "  <meta http-equiv=\"refresh\" content=\"0;url=http://$uamip:$uamport/logon?username=$username&password=$pappassword\">";
  } else {
    echo "  <meta http-equiv=\"refresh\" content=\"0;url=http://$uamip:$uamport/logon?username=$username&response=$response&userurl=$userurl\">";
  }

New portal codes:
=========================
if (isset($uamsecret) && isset($userpassword)) {
    echo "  <meta http-equiv=\"refresh\" content=\"0;url=http://$uamip:$uamport/logon?username=$username&password=$pappassword&userurl=$userurl\">";
  } else {
    echo "  <meta http-equiv=\"refresh\" content=\"0;url=http://$uamip:$uamport/logon?username=$username&response=$response&userurl=$userurl\">";
  }