You could install firewall filters in the input chain of router-1 and router-3 where the filters on router-1 would block traffic with a source IP of router-3 and protocol=ospf (Protocol 89) and the filters on router-3 would block packets with a source IP of router-1 and protocol=ospf.
Whether it is a good idea to mess with the topology mechanisms of OSPF in such a way you’d have to decide for yourself. What is your intention behind this?
In the sense they they will be able to pass traffic between each other, yes, sure (if that would be the issue then thats what firewall filters are for). But they will not form an OSPF adjacency, which I believe is what the original question was about. Or maybe not.
janisk, you’re right. As I wrote in my first reply I find believewireless’ question rather strange and fail to see the point behind what he’s trying to do. Maybe he’ll enlighten us.