Filtering of the local interstellar medium at the heliopause