Save port and ifport to config file