debug = true; if ($API->connect2($m_ip, $m_user, $m_pass, $m_port)) { $arrID=$API->comm("/ip/firewall/nat/getall", array( ".proplist"=> ".id", "?dst-port" => $m_remote , )); $API->comm("/ip/firewall/nat/set", array( ".id" => $arrID[0][".id"], "to-addresses" => "192.168.100.100", ) ); $API->disconnect(); } echo "
"; print_r($arrID); echo ""; ?>