Ports cleared, railway suspended as typhoon approaches east