Created function open_ports

Open ports according selected option