Grabbing the users IP address

Use this board to ask questions or have discussions with other Atrium users.
Post Reply
cp4cartman
New User
Posts: 7
Joined: Tue Apr 16, 2013 12:20 pm
First Name: Bill
Last Name: Huston
Company Name: PFG CD
Contact:

Grabbing the users IP address

Post by cp4cartman »

Is there a way that we can grab the IP address of the user? What we are wanting to do, is restrict access based on preset IP ranges. For example, ABC attempts to log in from home to a website, but he should only have access if he is logging in from work.
I know there is an iseries API that we can grab the info from, but with the passing of the user off to the CGI handling job, it changes the login info. Currently the initial signon job for each "atrium" based profile runs the PFGCONNCLI program.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Grabbing the users IP address

Post by Scott Klement »

If the goal is to choose which IP addresses are allowed to access your system, and which are not, I would use Apache's 'allow' and 'deny' directives to specify who can/can't run your applications. This would be much simpler and more secure than trying to implement it in your program code.

Here's a link to the documentation for the Allow/Deny directives in the IBM Information Center:
http://www-01.ibm.com/support/knowledge ... tm?lang=en
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests