LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-19-2008, 12:34 PM   #1
arsridhar
LQ Newbie
 
Registered: Mar 2008
Posts: 6

Rep: Reputation: 0
URL based restrictions


i have my servers with RHEL 4 and Oracle database. I have the applications running on the app server. I need to restrict access to the Oracle forms in the application server based on the client IP, eg. give permission to around 10 machines to access a particular form through a URL and restrict others from accessing the same.

how do i do this? do i need to go in for squid? or can it be done by configuring the httpd.conf file?
 
Old 03-20-2008, 09:56 PM   #2
rg.viza
Member
 
Registered: Aug 2006
Posts: 74

Rep: Reputation: 15
The easiest most straight forward way would be to grab the http variable for REMOTE_IP, then do a switch in your code.

in pseudo code:

$ipaddress = REMOTE_IP
if($ipaddress==$ip1 || $ipaddress==$ip2 [etc])
{
//show form
}
else
{
print "access denied"
}

Relying on IP could bite you if your users are on DHCP with their ISP.
You could also put the allowed ips in an array and do an array search to determine if they are allowed.

If this form is the whole reason for the system to be there, then you could restrict using a firewall, but that would block the entire server, not just the page you are securing.

Personally I'd secure it with LDAP. That way it's restricted by user, not machine. It will save you a lot of trouble later. LDAP would be the best option if you are in a network with a directory server. That way you can let them use their network login credentials and just check to see if they belong to the "Special Form" group. Single signon 4tw.

I secure all of my company's internal apps this way. In fact I use LDAP to manage different access groups for my apps. You can assign very granular permissions in your apps this way by using a bitmask and bitwise comparison. If you run out of bits, just make a second word and you get 32 more permissions, or 64 if everything is 64 bit.

Using LDAP puts the burden of user management on your network administrators instead of you ; )

-Viz

Last edited by rg.viza; 03-20-2008 at 10:14 PM.
 
Old 03-24-2008, 01:36 AM   #3
arsridhar
LQ Newbie
 
Registered: Mar 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by rg.viza View Post
The easiest most straight forward way would be to grab the http variable for REMOTE_IP, then do a switch in your code.

in pseudo code:

$ipaddress = REMOTE_IP
if($ipaddress==$ip1 || $ipaddress==$ip2 [etc])
{
//show form
}
else
{
print "access denied"
}

Relying on IP could bite you if your users are on DHCP with their ISP.
You could also put the allowed ips in an array and do an array search to determine if they are allowed.

If this form is the whole reason for the system to be there, then you could restrict using a firewall, but that would block the entire server, not just the page you are securing.

Personally I'd secure it with LDAP. That way it's restricted by user, not machine. It will save you a lot of trouble later. LDAP would be the best option if you are in a network with a directory server. That way you can let them use their network login credentials and just check to see if they belong to the "Special Form" group. Single signon 4tw.

I secure all of my company's internal apps this way. In fact I use LDAP to manage different access groups for my apps. You can assign very granular permissions in your apps this way by using a bitmask and bitwise comparison. If you run out of bits, just make a second word and you get 32 more permissions, or 64 if everything is 64 bit.

Using LDAP puts the burden of user management on your network administrators instead of you ; )

-Viz


thank you for the reply.
but do assist me further.

where do i do the changes? where is the pseudo code? Do i need to do the changes in the httpd.conf file or any other config file.

Sree
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Squid redirector/URL rewrite based on MIME type drmouse Linux - Server 0 02-25-2008 05:07 AM
MAC address based client restrictions aliasgherman Linux - Networking 1 04-10-2007 04:53 PM
URL based traffic shaping Britboy Linux - Networking 1 02-05-2007 09:11 AM
Timed based access restrictions with squid & danguardian keithdj Fedora 3 04-19-2006 10:27 AM
Can I route web traffic to 2 different hosts based on URL under 1 IP Address? Marshalle Linux - Networking 5 05-14-2005 03:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 03:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration