Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Prevent admin login from everywhere

More
10 years 9 months ago #114871 by htwsaar
I try to secure the actual limesurvey installation.

Our German office for data security wants us to prevent administrative logins from the outside.

.htaccess is not helpful because it just blocks mydomain.tld/admin and not the actual and well known link for login in the role of admin.

Can someone help if there is an easy way by edition the index.php in the main folder, for example?
I would do that chance after every future update.

Someone else had the same problem / idea?

Thank you
The topic has been locked.
More
10 years 8 months ago #115173 by htwsaar
I found a way that fits my requirements.

My solution is made with php. I just need to check the changes after every update.
The topic has been locked.
More
10 years 8 months ago #115179 by holch
Isn't it possible to block the "well known" URL via .htaccess as well?

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
More
10 years 8 months ago #115182 by htwsaar
While we are just allowed to use a few .htaccess directives this would not be a solution for us.
The topic has been locked.
More
6 years 11 months ago #173304 by sicoda_limesurvey
HI, this question is 3 years old, but would you give us a hint waht you changed in php ?
The topic has been locked.
More
6 years 11 months ago #173311 by DenisChenu
It can not be done in www.limesurvey.org/manual/Authentication...elopment#beforeLogin ?

Quick solution : set a limesurvey with 2 domain accessible : one with example.intra , other with example.org

And something like : if ($_SERVER != "example.intra") { throw 401; }

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
6 years 11 months ago #173430 by htwsaar

sicoda_limesurvey wrote: HI, this question is 3 years old, but would you give us a hint waht you changed in php ?


Here is my simple solution:
This works for large ip ranges. By changing the substring you can identify single IPs.
Private unrouted IP ranges would also work (like '192.168').



# Login into admin GUI only for dedicated IP addresses

# in file /application/controllers/admin/authentication.php



$IPRANGE = substr ($_SERVER,0,7);

switch ($IPRANGE) {
case "XXX.XXX":
break;
case "YYY.YYY":

break;

default:

die ('Admins only area!<br />');
The topic has been locked.
Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose