The best way to seal wood when you intend to paint it would be to use a stain-blocking primer that bonds well.