In general you can use the createrawsendfrom pattern to create an unsigned transaction, that is to be signed externally in some other place. If you run help data-all you'll see the right form to use for creating a filter. Here's a command-line example for a transaction filter that rejects everything:
createrawsendfrom 1RoKAUbjsr6sfcMLLeHsPeLLTXKTv2wp4oap49 '{}' '[{"create":"txfilter","name":"filter1","code":"function filtertransaction() { return \"reject all\"; }"}]'
In the help data-all message you can also see how to build transactions with filter approvals.