Let's say there is an Oracle database A and another Oracle database B. Our database is A.
Is there a way to block database links from B to A?
Let's say there is an Oracle database A and another Oracle database B. Our database is A.
Is there a way to block database links from B to A?
If you want to block all connections from whatever machine B is running on to A whether they are not they are using a database link, you can use the TCP.EXCLUDED_NODES parameter in your sqlnet.ora file.
If that is not what you want, you could potentially write a login trigger that tries to deduce whether the connection is via a database link presumably based on things like the machine and program from v$session or the IP address from sys_context('USERENV', 'IP_ADDRESS'). A login trigger can work reasonably well assuming your goal is mostly to keep honest users honest. But since you are depending on information that is supplied by the client, a hostile attacker can often work around the issue-- often rather easily.