Hey,
1. Create a firewall filter, i.e:
set firewall family inet filter lo0-out term block-ospf from protocol ospf
set firewall family inet filter lo0-out term block-ospf then discard
set firewall family inet filter lo0-out term default then accept
2. Apply this filter to the loopback interface (output - from RE, input - to RE), i.e:
set interfaces lo0 unit 0 family inet filter output lo0-out
Although my example with OSPF is bad as it's better not to turn it on at all (nothing under [protocols ospf] hierarchy) rather than explicit filtering, however it's only example.
The key is that you can always filter traffic to and from RE (lo0 input and output, respectively). Be cautious not to filter too much though (default accept, counters in fitlering terms and so on)
Thanks,