add ip validation for remote_addr