Solved

Access DB through firewall

Posted on 2014-11-19
1
185 Views
Last Modified: 2014-12-04
A system located in head office, this system consists of oracle database and oracle forms, there is some users on database are default users and their passwords cannot be changed.
This system is connected to branches; the local network is connected to a firewall which is connected to a router to the branches.
Now some employees on branches knows the password of the default users which has special permissions on database.
The question is : can we let the employees on branches open the oracle forms and connect to database and restrict them to a new user we create for them on DB and disallow them to access the data base using one of the default users using the firewall?

Thanks,
0
Comment
Question by:oamal2001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 74

Accepted Solution

by:
sdstuber earned 500 total points
ID: 40453092
In a logon trigger you can check if the user is coming from a particular ip  address (the firewall) or not and then either allow them through or return an error.

That might look something like this...

CREATE OR REPLACE TRIGGER trg_deny_remote_default
    AFTER LOGON
    ON DATABASE
BEGIN
    IF USER = 'DEFAULT_USER'
   AND SYS_CONTEXT('userenv', 'ip_address') NOT IN ('123.123.123.123',
                                                    '123.123.123.124',
                                                    '123.123.123.125',
                                                    '123.123.123.126')
    THEN
        RAISE_APPLICATION_ERROR(-20001, 'Default user must login from local address');
    END IF;
END;
/

Open in new window



Adjust the ip lookup rule to whatever is appropriate for your system.

Perhaps something with a LIKE clause to check ranges (white list)

 AND SYS_CONTEXT('userenv', 'ip_address')  LIKE '123.123.123.%'

or a NOT condition (black list)

AND SYS_CONTEXT('userenv', 'ip_address')  NOT LIKE '123.123.123.%'
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The related questions "How do I recover the passwords for my Q-See DVR" and "How can I reset my Q-See DVR to eliminate a password" are seen several times a week.  Here we discuss the grim reality of the situation.
There's a lot of hype surrounding blockchain technology. Here's how it works and some of the novel ways it' s now being used - including for data protection.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question