Kayako logo
Modifications & Addon Releases Modification guides and addons are posted here to share with the community. Do not post requests in here!

Notices

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  (#1) Old
craigbrass Offline
Senior Member
 
Posts: 5,245
Join Date: Jun 2005
Location: Cumbria, UK
Limit Windows Application Login to Specific IPs - 01-02-2008, 02:52 PM

Open /winapp/index.php and right after the copyright information, add the following :-
Code:
$listofauthorizedips = array('222.222.222.222','222.222.222.222');
if (!in_array($_SERVER['REMOTE_ADDR'], $listofauthorizedips)) {
	die('You are not authorized to use the windows application.');
}
Simply replace the IPs with the ones you wish to authorize.


Craig Brass - Kayako Forum Squatter (Note: I am NOT a staff member)

Icon Headquarters - Its Elixir - Web2Messenger

Last edited by craigbrass; 08-07-2008 at 12:11 PM.
   
Reply With Quote
  (#2) Old
jnet Offline
Member
 
Posts: 494
Join Date: Mar 2008
09-07-2008, 02:56 PM

thanks I will try that
   
Reply With Quote
  (#3) Old
Siora Offline
Member
 
Siora's Avatar
 
Posts: 1,279
Join Date: Apr 2007
Location: Toronto Canada
09-07-2008, 04:50 PM

How does this mod work regarding agents connected to a router or those that don't know the main IP address, they only know their local IP address.


Siora Solutions Inc.
www.sioraIT.com
   
Reply With Quote
  (#4) Old
John Haugeland Offline
Developer
 
John Haugeland's Avatar
 
Posts: 308
Join Date: Dec 2007
Location: Idaho
09-07-2008, 09:23 PM

It would be far more appropriate to implement something like this in a .htaccess rule, which will correctly handle resolving rDNS, alternate network identity encodings, alternate IP address encodings and so forth, rather than to alter the application.

We do not recommend this modification.


John Haugeland (john.haugeland ]at[ kayako.com)
----------------------------------------------------------------
---
   
Reply With Quote
  (#5) Old
John Haugeland Offline
Developer
 
John Haugeland's Avatar
 
Posts: 308
Join Date: Dec 2007
Location: Idaho
09-07-2008, 09:49 PM

Ryan says I should clarify why I'm asking customers to do things in a different way than the application does.

1) We can't put stuff in .htaccess for several reasons. First off, some webservers don't support .htaccess, or have it turned off, or limit how it can be used, or etc. We also can't be certain that any given webserver is using them, and it's not really acceptable for our code to make security assumptions about driving webservers. End users know what webserver they're using and how it's configured, and as such do not have this limitation.

2) We don't want people modding their desks if it's not necessary, especially for security stuff, for several reasons. Besides that we can't check the work, it also means that every time the desk is updated, the change goes away. Especially for security related topics, things should not need to be remembered.

3) It's a lot easier for an end user to check if .htaccess is correct.

4) .htaccess will be a lot faster.

Craig's fix is generally correct, but users can't do the same things that staff do, particularly because upgrading wipes out changes you make that aren't in the main tree.

We continue to recommend a .htaccess driven solution.


John Haugeland (john.haugeland ]at[ kayako.com)
----------------------------------------------------------------
---

Last edited by John Haugeland; 09-07-2008 at 09:52 PM.
   
Reply With Quote
  (#6) Old
GoneShootin Offline
Member
 
GoneShootin's Avatar
 
Posts: 121
Join Date: Jan 2008
28-07-2008, 04:29 PM

John

Do you have an example htaccess file that can be used as a base to implement such a task? I raised a similar question here and was pointed to this thread.
   
Reply With Quote
  (#7) Old
craigbrass Offline
Senior Member
 
Posts: 5,245
Join Date: Jun 2005
Location: Cumbria, UK
28-07-2008, 08:48 PM

htaccess way is as follows.
Code:
Order Deny,Allow
Deny From All
Allow From 1.2.3.4
Allow From 1.2.3.4
Add additional lines for additional IPs.


Craig Brass - Kayako Forum Squatter (Note: I am NOT a staff member)

Icon Headquarters - Its Elixir - Web2Messenger
   
Reply With Quote
  (#8) Old
John Haugeland Offline
Developer
 
John Haugeland's Avatar
 
Posts: 308
Join Date: Dec 2007
Location: Idaho
28-07-2008, 09:11 PM

Craig posted a correct answer, but it looks like vBulletin may have mangled it slightly.

Here's a manpage.


John Haugeland (john.haugeland ]at[ kayako.com)
----------------------------------------------------------------
---
   
Reply With Quote
  (#9) Old
GoneShootin Offline
Member
 
GoneShootin's Avatar
 
Posts: 121
Join Date: Jan 2008
28-07-2008, 10:06 PM

Thanks craig et al.
   
Reply With Quote
  (#10) Old
craigbrass Offline
Senior Member
 
Posts: 5,245
Join Date: Jun 2005
Location: Cumbria, UK
29-07-2008, 09:29 AM

Your welcome. Glad I could be of help.


Craig Brass - Kayako Forum Squatter (Note: I am NOT a staff member)

Icon Headquarters - Its Elixir - Web2Messenger
   
Reply With Quote
Reply

Tags
application, ips, limit, specific, windows

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up e-mail parsing using POP3 (or IMAP) on Windows 2003 Server bardfor E-mail Piping Issues 6 12-08-2008 04:00 AM
Windows update KB944533 causes LiveResponse application crash Jamie Edwards News and Announcements 0 13-02-2008 11:17 PM
Limit staff from connecting using the Desktop Application Thijs LiveResponse Desktop Application 12 01-02-2008 11:32 PM
Free Limit Windows Application Use to Specific Users craigbrass Modifications & Addon Releases 0 01-02-2008 02:53 PM



Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46